[MTOS-dev] Memory Utilization Brainstorm

Hirotaka Ogawa hirotaka.ogawa at gmail.com
Sun Dec 30 18:34:17 PST 2007


On Dec 31, 2007 7:32 AM, Timothy Appnel <tim at appnel.com> wrote:
> On 12/29/07, Hirotaka Ogawa <hirotaka.ogawa at gmail.com> wrote:
>
> > uum, actually, I think handling a circular structure itself is not so
> > hard.  We can handle them by employing weak references or
> > Object::Destroyer as you described, or just encapsulating circular
> > references into one field of the root/parent object and destroying
> > such references in the destructor of the root object.
>
> Perhaps you are misunderstanding what I was getting at.
>
> I am (now) familiar with all of these approaches to dealing with
> circular references. They are (relatively) easy to code, but difficult
> to implement given how MT's code is structured and in maintaining
> backwards compatibility.
>
> As I mentioned in the message I just sent out, besides the template,
> node, tokens circular reference that is most prevalent I suspect that
> other, albeit slower, memory leaks exist between other MT::Objects
> given how they cache each other. Sound possible?

OK.  My understanding is that, we should strictly identify circular
structures in MT and try to implement them in a clear, compatible, and
well-known way.  If it is hard to do, as the next best way, it is a
possible solution to wrap MT::Objects with Object::Destroyer to avoid
and/or resolve circular references in general, as you suggested in the
former message.

>
>
> <tim/>
>
> --
> Timothy Appnel
> Appnel Solutions
> http://appnel.com/
>



-- 
Hirotaka Ogawa makes no sense.
http://as-is.net/blog/


More information about the MTOS-dev mailing list