Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Possible WISH LIST item?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00149579
Message ID:
00149967
Views:
25
>If you want a good idea try it in C++ by calling the destructor directly
>from within a class method <s>...

Actually, calling a destructor explicitly won't do any real harm (depending on what the destructor actually does, of course). It's just code. It doesn't release memory (unless that's what you wrote inside it).

However, calling

delete this;

can have effects (you can execute code after it, but should not access any properties or call any virtual methods). Nevertheless, it's the correct solution in some cases.

>>Yeah, but you're not talking about external release!

No, we're talking about a Release() method that simply does RELEASE THIS.

It's too bad Steven Black isn't around to comment on this. He's the first guy I saw to suggest it, after extensive testing (and hair-pulling).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform