Re: Basic question refPtr
- From: Povietkin Konstantin <povetkin k gmail com>
- To: gtkmm-list gnome org
- Subject: Re: Basic question refPtr
- Date: Wed, 11 May 2011 00:21:12 +0300
The best way check a behaviour of Glib::RefPtr is to read the source
code.
For my experience i can tell that refptr will be destroyed!
В Вто, 10/05/2011 в 12:04 +0200, Kees Kling пишет:
> 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
>
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
--
"No Civilization = Freedom"
------------------------------------------------------------------------
Yes, I am a criminal. My crime is that of curiosity.
My crime is that of judging people by what they say and think, not what
they look like.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]