Re: Create a new object and return to a RefPtr
- From: "Milosz Derezynski" <internalerror gmail com>
- To: "Dinh Khac Thanh" <thanhdk gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Create a new object and return to a RefPtr
- Date: Wed, 4 Jun 2008 16:14:38 +0200
Since it's Glib::RefPtr::RefPtr<T>(T*), with T being a typename, you would need to accordingly use RefPtr<T> pT (new T(...));
With an assignment, you can only assign another RefPtr<T> with T being the same type as the T of the lvalue.
2008/6/3 Dinh Khac Thanh <
thanhdk gmail com>:
Hi,
I created a custom class that inherits from Gdk::Pixmap with custom constructor. How do I instantiate an object from this class and then make a RefPtr point to that object? For example Item* pItem= new Item(some params here); But for RefPtr: RefPtr<Item> pItem = ?
Thank you for your support.
Regards
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]