Re: Memory leak in gdbus-codegen generated code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Tue, Feb 10, 2015 at 3:37 AM, Norman, Anders <Anders.Norman@xxxxxxxxx> wrote:
> The base class is simply never cleaned up. Typical types registered with GType are static, meaning they aren't ever cleaned up for the entire duration of the process.
>
> Why do you need to clean up the type?
I'm making a framework which other developers will use to create applications. Yes, I can tell the developers to ignore the leak, but I think the question should be the other way around: Why do you need to leak this memory?

consider this piece of C++

struct Foo {
     Foo() {}
     void do_something() { printf ("i am foo\n"); }
     static int x[100];
};

if this was in a library, loading the library will allocate 4*sizeof(int) on the heap for the static member of this class.

the memory will not be released until the library is unloaded, which in many cases will never happen during the normal life of the program.

is this a leak? do you expect to provide developers with a meaningful answer, when they don't understand objects/classes and class-owned memory?



_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux