Latest non-trivial changeset



Please carefully review this changeset. It will be available in pre
release v0.0.5 and I would like to have this incredibly right and stable
by that time.

The folder-store-tree-model is keeping a reference on each and every
folder. Each and every folder was also keeping a reference on the model
itself. That's because the model was an observer of each folder too.

This is a cyclic reference:

A->B = B;
B->A = A;

You need a clever garbage collector to solve that. GObject only has ref
and unref. If you think a bit about it, you can't ever get such a
situation correctly finalised (where both A and B get finalised).

For that reason you have weak references in GLib's GObject subsystem. I
changed tny_folder_add_observer and tny_folder_store_add_observer to use
weak references in stead of strong references. It no longer uses TnyList
internally either (because TnyList only knows about strong references).

http://tinymail.org/trac/tinymail/changeset/2927

This is a non-trivial changeset. It might introduce problem, it will fix
several problems. It's the right thing to do, so let's get this one
working correctly.

Note that I have been doing basic tests and they all seemed to work
fine.

-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]