Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
My program was suffering from the same problem. I was also forced to give all my classes a "releaseAll()" method which was essentially the same as your "prepareForGC()." The problem is that it makes the code inflexible. If I change data members in any way, I have to make sure I go and change the classes' releaseAll() methods. I think the response that has been posted has missed the fact that many (conservative) garbage collectors can't handle circular references. This forces the programmer to worry to much about freeing memory. If I wanted to do that, I'd be coding C++. Does anybody out there have a straight forward appraoch to solving this problem? Thanks, --Evan
Replies: |
Sponsored Links
|