Comment 6 for bug 522384

Revision history for this message
Alexandr Grigorcea (cahr-gr) wrote : Re: [Bug 522384] Re: Memory leak

iPdf creates pixbufs of pages (ref count 1), iDocument uses them to create
gtkImages (image adds reference, so ref count 2) ... iDocument->end()
destroys gtkImages (ref count again 1) and ~iPdf does nothing (it prints a
message), it just can't, because those pointers are lost, at some point you
need to unref pixbufs
just checked that, on 2 small pdfs after 5 switches mem usage was 14%, now
it 3-4%, but it still leaks, after 50 switches memory usage increments of
0.5%

On Wed, Feb 17, 2010 at 5:34 PM, Jordi PuigdellĂ­vol <email address hidden>wrote:

> ummmm
>
> I don't understand those references so much but, when I destroy the
> widget (wich contains the gtkImages) it destroys the gtkImages right?
> then it decrases the reference count, finally when I unref the pixbuf in
> ~iPdf() ref count should be 0?
>
> But sure I'm wrong cause there are the mem leaks
>
> --
> Memory leak
> https://bugs.launchpad.net/bugs/522384
> You received this bug notification because you are a member of Gloobus
> Developers, which is the registrant for gloobus-preview.
>
> Status in Gloobus Preview: Confirmed
>
> Bug description:
> I've already reported this here
> https://bugs.launchpad.net/gloobus-preview/+bug/505644/comments/3 for pdf
> files , but now I noticed that it happens with any kind of files
> opened a folder with 2 images, after 20-30 switches got 24% of memory usage
> of my 4Gb
> some files eat less memory, other more
> rev173
>
>
>