[PEAK] deleting objects
Phillip J. Eby
pje at telecommunity.com
Mon Nov 1 19:37:49 EST 2004
At 04:38 PM 11/1/04 -0500, R. David Murray wrote:
>What things do I need to do when deleting an object?
>Obviously I run the sql to delete it in my
>persistent store, but what do I do to inform the
>PEAK machinery that the object no longer exists?
Normally, nothing. The default DM cache is a weak dictionary; the object
will disappear from the cache as soon as it's no longer referenced. If
it's part of a circular reference, or a reference is held by some other
part of the program, the cache will be cleared at the end of the
transaction (unless you've configured the DM to keep items cached for longer).
If all else fails, you can manually delete it from the cache.
More information about the PEAK