Re: The use of RefPtr



On 03/05/2009 08:05 PM, Eddie Carle wrote:
I am unclear as to why these shared pointers are needed for certain
things. For example, why can I not pass a TreeModel that has been
statically allocated to ComboBox?

It the TreeModel constructor even accessible? I don't think it is.

If the TreeModel goes out of scope at
the same time as the ComboBox will there still be problems? Is there a
way to get ComboBox to accept a normal pointer and not worry about the
deallocation of the TreeModel?

Because TreeModel are refcounted as they can be shared with different widget.
That's the design.

Hub


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