Basic question refPtr
- From: Kees Kling <ckling upcmail nl>
- To: gtkmm-list gnome org
- Subject: Basic question refPtr
- Date: Tue, 10 May 2011 12:04:11 +0200
Hi
perhaps a newbie question about the refPtr
I'm my app I have a refptr declared as private member of a class
example snippet
class nothing {
public: nothing();
private:
Glib::RefPtr<Gdk::Bitmap>nosense;
void makeSense();
}
nothing::nothing() {
// init the refptr
nosense = Gdk::Bitmap::create(window, data, width, height);
}
nothing::makeSense() {
nosense = Gdk::Bitmap::create(window, data, width, height);
}
What I'm doing basically is take a Glib::RefPtr declared in the class
and initialized in the CTOR. Later in one of the methods (nosense) I
reinit the refptr. I want to know if memory allocated in the first init
will be destroyed by the second init or do I have to take care for it
myself and how?
Thanks
Kees Kling
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]