W3C home > Mailing lists > Public > www-jigsaw@w3.org > September to October 1996

Re: Life span of a resource

From: Anselm Baird-Smith <abaird@w3.org>
Date: Tue, 8 Oct 1996 08:00:38 -0400 (EDT)
Message-Id: <199610081200.IAA03740@anansi.w3.org>
To: "mailing list receiver" <bulk@digipub.be>
Cc: "jigsaw" <www-jigsaw@w3.org>
mailing list receiver writes:
 > > From: Anselm Baird-Smith <abaird@w3.org>
 > >  > 3. Is there a method in the resource that's
 > >  > being called when jigsaw shuts down (for resource cleanup)?
 > >  > finalize() does the job, but only when
 > >  > garbage is collected ...
 > > 
 > > Well, there is a mean to do that. When Jigsaw unload a resource
 > > (perhaps because it is shut down, or because memory is low), it runs
 > > through the following steps:
 > > 
 > > a) If some of the resource attributes have been modified, it saves it
 > > b) If any resource locker exists for that resource, it notifies them
 > > 
 > > In your case, you probably want to use b), by registering a resource
 > > locker for the resource you want to monitor. Check:
 > > 
 > > /User/api/w3c.jigsaw.resources.ResourceLocker.html
 > 
 > 
 > I found a method called notifyUnload(),
 > in what does it differ from the lock & notify unlock
 > way of doing things?
 > 

Yeah ! You are right, I forgot about that one (well, I forgot its
spec), that's what you want to use in fact, it's much better then
finalize (I wish I hadn't forgot this, I would have use it in the
ProxyDirectory resource).

Anselm.
Received on Tuesday, 8 October 1996 08:00:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:25 GMT