Hello!

I've encountered some problem with 'etl::handle'.

When 'etl::shared_object' created it have zero reference count. It's
initial state of object.

When we assign it to any 'etl::handle' reference count increases. And we
cannot turn object back to initial state - object will be deleted instead.

Usually it's not a problem, we just create handle and keep it while object
is necessary. But in constructor we cannot keep this handle. So we should
do not create handle to 'this', and cannot use any methods which creates
handle to 'this'. For example i cannot call 'add' method while
construction of 'ValueNode_DynamicList'.

To solve this i've added 'unref_inactive' method into 'shared_object' and
'virtual_shared_object' classes. Which decrease a reference counter but
not deletes object.

I hope it will helpful.

Ivan




------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Synfig-devl mailing list
Synfig-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to