summaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-02-09 21:30:00 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-09 11:40:55 -0800
commit801b0832aec41cf878c9a384dc46ba72b65a4083 (patch)
treea21abc6122107d6145afa56f247dbf872d39f61d /README
parentea21126f627c69a50130e7659970f148313eae17 (diff)
downloadsubsurface-801b0832aec41cf878c9a384dc46ba72b65a4083.tar.gz
gps.c: Use only one instance of the map object and window
Both show_gps_locations() and show_gps_location() have static local variables 'map' (OSM_TYPE_GPS_MAP) and 'window', so technically both would create their own instances of these objects. This patch promotes the two variables to global, so that only one instance per type ever exists. A memory leak that is addressed is at the flag pixbuf allocation, which has to be freed right after the image is added to the map: picture = gdk_pixbuf_from_pixdata(&flag_pixbuf, TRUE, NULL); ... gdk_pixbuf_unref(picture); There is also a heap-lifespan memory leak at: map = g_object_new(OSM_TYPE_GPS_MAP,... but GLib isn't exacly happy about us unrefing it right before exiting the GTK main loop, so no fix is provided for that unfortunately. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions