A little birdy (in the way of a feedback report update email) told me that weak references are nearly here.. have patience...

- T

On 14/02/2007, at 11:51 AM, Guyren Howe wrote:

On Feb 13, 2007, at 6:47 PM, Norman Palardy wrote:

On Feb 13, 2007, at 5:41 PM, [EMAIL PROTECTED] wrote:

I know that a RB will destroy objects with no references remaining, but is it possible to force an object to get destroyed, even if there are multiple references to it?

You have to get rid of all the references by nil'ing them or having the objects holding the references go out of scope

There's no "kill this object"

There is a supplementary answer: weak references.

What would you want to have happen to the references to the object when you destroy it? The only reasonable answer is: have them become nil.

That's what a weak reference does: it refers to an object, but doesn't stop it being destroyed, and when the object is destroyed, it becomes nil.

Unfortunately, REALbasic doesn't have weak references. But if it ever does acquire them, now you know what they're for. :-)

Regards,

Guyren G Howe
Relevant Logic LLC

guyren-at-relevantlogic.com ~ http://relevantlogic.com

REALbasic, PHP, Ruby/Rails, Python programming
PostgreSQL, MySQL database design and consulting
Technical writing and training


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to