[Bf-committers] Reference counting, deleting data and fake users

Tom Edwards contact at steamreview.org
Wed Mar 14 19:40:41 CET 2012


This is a problem specific to Actions. An object can have any number of 
relevant Actions, but it can only _use_ one at a time. Shameless plug: 
there's a patch at 
<http://projects.blender.org/tracker/index.php?func=detail&aid=28453> 
that fixes this problem.

It's possible to get into this situation with other data types, but that 
requires the user to do advanced things like manually change an object's 
data or to explicitly delete the datablock.

On 14/03/2012 6:20, Antony Riakiotakis wrote:
> Interesting ranting post on blenderartists about data lost due to user
> not setting fake user on datablock.
>
> http://blenderartists.org/forum/showthread.php?248813-MAJOR-BUG-in-2.62-loosing-Actions/page1
>
> The point is, in my opinion: Should the user care about the number of
> datablock references? This looks like something that would concern the
> reference counting system of a memory manager/garbage collector rather
> than users.
>
> This would not have been a problem if we had an explicit way to delete
> data and data always stayed in blender even after closing the program.
> A user will usually want his data to stay if he creates it and go if
> he deletes it. Currently there are two problems with the approach we
> have: 1) You have to close the program to delete all unreferenced data
> and 2) You can't create a library of datablocks without explicitly
> setting a fake user, which is not the best of options.
>
> I realize this might have been a popular theme of debate but I am not
> up to the facts. Is this a design choice or simply not  implemented
> yet? Is this part of the asset browser project?
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list