logo       

Re: recursive function + event : is this legal/supported ?: msg#00063

mozilla.devel.dom

Subject: Re: recursive function + event : is this legal/supported ?

rvj wrote:
Q1. If I want to delete these spawned objects, I simply do this in the
loadhandler by setting the passed object to null.

function loadhandler(request)
{
// kill "instance" of request object
request=null

This does absolutely nothing, since the calling context (the event listener) still references the request. You may want to remove the event listener, unless this is done automatically somewhere.

Q2. but does setting each request object to null also free up ALL
"associated array" properties subsequently created ??

No, since the object doesn't get garbage-collected. When the object is garbage-collected, so are all its properties; if those happen to be XPCOM objects then their Release() methods are called as appropriate.

-Boris


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise