What you're talking about here sounds a lot like the class implementation method of "inside-out objects". -- Darren Duncan

Ernesto wrote:
*No Memory Leaks by Design*

The mechanism of creating, storing and loading of objects is explained
on
http://dienstleistung-kultur.de/frost/Frost.html#The_underlying_magic_disclosed

Every time you access an object via My::Class->new, you'll get _another_
instance. This is not a complete object, only a proxy, which holds just
the attributes "id" and "asylum", all other attributes are stored in
Frost::Twilight - a cache, basically a simple hash of hashes.

The value of a not-present attribute is fetched from this cache and if
it's not found, from Frost::Cemetery, which is a wrapper around a
BerkleyDB table.

If the attribute holds an object, the object is instantiated - as proxy
object as well. Therefore all objects to be saved must inherit from a
base object, which inherits from Frost::Locum - the proxy object.

The methods in Frost::Meta::Instance named inline_* are overwritten to
manage the values as described.

You'll never get the same object's address but always the same content.

And if this proxy object goes out of scope, it's garbage collected.

So memory leaks shouldn't appear.

Reply via email to