Tom Cooksey wrote:
>>> This will actually
>>> decrement the ref count on the real palette (making it 2, one for src &
>>> dest surfaces).
>> That is usually the result but the real  story is a bit more complicated.
>> The interface object itself is reference counted. The reference count is
>> 1 when you create the object. Calling Release() on it will decrement that
>> reference count (AddRef() can be used to increase the ref count). When
>> the ref count reaches 0 the interface object's destructor is called which
>> will drop the reference on the real palette (CorePalette).
> 
> So _both_ the interface object and real object are ref counted? Why?

The interface has just a simple local (process) ref count while the CorePalette
being a FusionObject has a reference counter adding all processes' references
to the object as well as the 'global' or 'anonymous' references that are used
for inter-shared-object dependencies (pointer from CoreSurface to CorePalette).

-- 
Best regards,
   Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to