[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Disposing object instances
- To: firstname.lastname@example.org (Peter Stone)
- Subject: Re: Disposing object instances
- From: email@example.com (Peter Szolovits)
- Date: Mon, 6 Feb 1995 18:02:16 -0500
- Cc: firstname.lastname@example.org
- Sender: email@example.com
By definition, an object is only garbage when there is no way to reference
it. If you had the ability to "mark it as garbage" when you still retained
references to it, you would almost surely get bizarre errors when some
other part of your program followed those references.
Usually, you just need to be sure that you are not keeping things like
history lists to make sure that it's easy to actually forget stuff you no
longer want to remember. MCL has "weak" hash tables that even allow you to
implement stuff like this easily.
What sort of code are you writing that keeps references to things you no
longer need and causes you to run out of room?