B
BuddyWork
Hello,
If you have the following code
public class Logging
{
public static void LogMessage(string myData)
{
// code logs some data
}
}
public class Car
{
public void Test()
{
Logging.LogMessage("this is a very long string");
}
}
My Question is that when the data from function Test is passed through
to the LogMessage the memory is stored on the stack, when the Test
function and LogMessage is out of scope, does the memory move to the
heap in GEN 0, and then it might work its way to GEN 2.
If you have the following code
public class Logging
{
public static void LogMessage(string myData)
{
// code logs some data
}
}
public class Car
{
public void Test()
{
Logging.LogMessage("this is a very long string");
}
}
My Question is that when the data from function Test is passed through
to the LogMessage the memory is stored on the stack, when the Test
function and LogMessage is out of scope, does the memory move to the
heap in GEN 0, and then it might work its way to GEN 2.