Re: Memory leak of RefPtr?
- From: Paul Pogonyshev <pogonyshev gmx net>
- To: gtkmm-list gnome org
- Cc: "gtkmm-list gnome org" <gtkmm-list gnome org>
- Subject: Re: Memory leak of RefPtr?
- Date: Fri, 25 Aug 2006 20:30:49 +0300
Lieven wrote:
> > Briefly: it is impossible to create a memory leak with RefPtr as long
> > as you use pointers created by Gtkmm and don't create your own from
> > raw pointers. (Creating by copy constructor from other RefPtr's is
> > OK.)
>
> Actually, it's rather easy to have memory leaks with RefPtrs, all you need
> is a circular reference, and the ref counting won't work any more.
Mmm, you are probably right. However, it is impossible (or a bug) with
standard GTK objects. If you are writing your own, make sure they don't
reference each other. (And it's not quite easy, but yeah, possible.)
Paul
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]