Re: Memory leaks
- From: Costin Chirvasuta <costinc gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Memory leaks
- Date: Thu, 10 Feb 2011 14:00:46 +0200
The basic idea that one must understand about programming is that of
paradigms and concepts. They are really stressed for C++ and higher
level stuff (scripting languages notwithstanding ofcourse). But if
you're gonna use C you're gonna write paradigms and concepts that
you'll really have to be ensure are coherent.
You're definition of a leak is a hack in every way. When you define
something in a program you call it by it's proper name. If it's a leak
to libc, it's a leak to Valgrind, it's a leak from every programmatic
point of view you can muster. It's a leak from the ground up. It's not
a leak at all but one layer: the first. Sure, it won't matter most of
the times but it's really messy.
Nobody is arguing that manually cleaning up is more efficient. But why
on earth would 200 pointers initialized and _used_ by GTK be likely to
be found in swap (I may be slightly wrong, but just as a point of
view).
But, more importantly: as I mentioned before, let's compare apples
with apples. When you close your program you're properly, manually
freeing probably hundreds, thousands more pointers.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]