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:
00149706
Views:
24
>It's my understanding that, inside any object's method code, RELEASE THIS releases the object unconditionally. Hence, all my base classes have a Release method does does nothing but RELEASE THIS.

I don't think so - if you have left over references in other areas of
your code that object will stick around. Doing RELEASE THIS is also
not safe, because you're telling the object to release itself before
state is cleaned up.

I firmly believe that you should never release your object internally,
at least not through the language. Rather I belive in having Release
methods that make sure that when the object goes away all hanging
refs get cleaned up properly.

>I'm sure you're aware of the reason for the behavior you describe. Memory management can be difficult in OOP, because of all the little objects floating around. In general, though, you don't have to concern yourself with memory leaks in VFP the way you'd have to in C++, e.g.

Hanging references are definitely a problem in VFP and not all of them
come from actual assignments <s>... This stuff is very difficult
to track down for sure.

+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform