Re: [gtkmm] Glib::RefPtr construction
- From: murrayc t-online de (Murray Cumming)
- To: Michael Johnson <michaelj maine rr com>
- Cc: gtkmm mailing list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Glib::RefPtr construction
- Date: 07 Jan 2003 22:55:11 +0100
On Tue, 2003-01-07 at 22:08, Michael Johnson wrote:
> In reading through the source for Glib::RefPtr I note that the constructor
>
> RefPtr<T_CppObject>::RefPtr(T_CppObject* pCppObject)
>
> Does not increase the reference count of the referenced object, though
> all other means of assigning a value to a RefPtr (including the
> assignment operator that takes a pointer) do increase the reference
> count. Is this intentional, or is it an accidental omission?
The pCppObject is normally created with a refcount of 1, and the final
RefPtr<> destructor unrefs it to 0, causing pCppObject to be deleted.
--
Murray Cumming
murray usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]