J
josh
Hi,
I have an important doubt!
If in my class I implement a Dispose() method and then call it from
my application is it useful only for free unmanaged resources?
the object itself is then discarded from heap memory by the GC when it
wants?
my doubt is, for example, if MyObj has a destructor:
{
MyObj o = new MyObj();
....
o = null;
}
then here when o is out of scope the GC call the destructor, if
present, but the object itself is then
destroyed from memory when it wants?
Thanks
I have an important doubt!
If in my class I implement a Dispose() method and then call it from
my application is it useful only for free unmanaged resources?
the object itself is then discarded from heap memory by the GC when it
wants?
my doubt is, for example, if MyObj has a destructor:
{
MyObj o = new MyObj();
....
o = null;
}
then here when o is out of scope the GC call the destructor, if
present, but the object itself is then
destroyed from memory when it wants?
Thanks