C
Carlos
Hi,
in VSC++2005
I have a ref class
ref class A
{
public:
// ...
int n;
double d;
};
int main()
{
A^ pA = gcnew A();
pA->n = 33;
pA->d = 3.1416;
Console::WriteLine( "{0} {1}" , pA->n , pA->d ); // OK
delete pA;
Console::WriteLine( "{0} {1}" , pA->n , pA->d ); // OK!!??
return 0;
}
Why I do not have an error (or a warning) in the 2nd call to
Console::WriteLine ?
Why I have the right values of n and d after calling delete?
Thanks.
in VSC++2005
I have a ref class
ref class A
{
public:
// ...
int n;
double d;
};
int main()
{
A^ pA = gcnew A();
pA->n = 33;
pA->d = 3.1416;
Console::WriteLine( "{0} {1}" , pA->n , pA->d ); // OK
delete pA;
Console::WriteLine( "{0} {1}" , pA->n , pA->d ); // OK!!??
return 0;
}
Why I do not have an error (or a warning) in the 2nd call to
Console::WriteLine ?
Why I have the right values of n and d after calling delete?
Thanks.