After I destroy a fvMesh objec
After I destroy a fvMesh object:
I could still use mesh variable with no complains from the compiler?! Did I do something wrong?
>After I destroy a fvMesh obje
>After I destroy a fvMesh object:
I would never have thought of using the destructor function this way :-o
Not the destructor function destroys an object, but when an object is destroyed, then the destructor is called.
>I could still use mesh variable with no complains >from the compiler?!
There are several objects with an empty destructor, so calling it has no effect. But generally its a very, very bad idea.
>Did I do something wrong?
Depends on your point of view. I suggest doing something right would be to learn C++.
"Note that explicit call of d
[Stroustrup2000 p. 256] "Note that explicit call of destructors ... should be avoided wherever possible. Occasionally, they are essential." Thanks for your help.
|All times are GMT -4. The time now is 01:45.|