[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] garbage



Any suggestions though about how to do this? For instance, if I set a = nil, How does the original 'a' know it can clear it's unique methods and be GC'd? My guess is that currently it can't, but I thought I would check.

Or - is there a way to store unique methods within the object that is created itself instead of in Object.uniqueMethods?

Best,

Josh

On Feb 27, 2008, at 7:36 PM, James McCartney wrote:

a.removeUniqueMethods will release an object from the table.
you can wipe out all unique methods by doing:
uniqueMethods = nil;

There is no finalization (dtor).


On Wed, Feb 27, 2008 at 4:40 PM, Josh Parmenter <josh@xxxxxxxxxxxxxxxxx > wrote:
Hi all,

Ryan Brown just pointed out to me that Objects that use addUniqueMethod
don't get completely garbage collected (and this can be seen in
Object.uniqueMethods). Here is a short example:


a = Object.new.addUniqueMethod(\freeMe, {2});

Object.uniqueMethods;

a.freeMe

a = nil;

Object.uniqueMethods;






Is there anything already built into the language, like a dtor function or method that I could assign to an object that would remove unique methods
from from this Object array?




Thanks...




Josh




******************************************

/* Joshua D. Parmenter

http://www.realizedsound.net/josh/




"Every composer – at all times and in all cases – gives his own
interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi
Nono*/

_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://lists.create.ucsb.edu/mailman/listinfo/sc-devel





--
--- james mccartney
_______

******************************************
/* Joshua D. Parmenter
http://www.realizedsound.net/josh/

“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono
*/