fixed severe bug related to plot/objects references - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/window.cpp
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2010年09月19日 17:03:07 +0200
committerFrancesco Abbate <francesco.bbt@gmail.com>2010年09月19日 17:03:07 +0200
commitf01979f1b5acf2fae8a056563588e00cb5243649 (patch)
tree3eaec36bb21bf0c9d4ea266f502decbea5d5a96f /agg-plot/window.cpp
parented3c571ba9f9d9023b7a2619ef4979717668703d (diff)
downloadgsl-shell-f01979f1b5acf2fae8a056563588e00cb5243649.tar.gz
fixed severe bug related to plot/objects references
When doing clear layer and pop layers references from plot to the objects were not removed. This was the cause of severe memory leaks. Problem fixed by structuring the plot/object references by layers similarly to what done for windows when plot are referenced by slot_id.
Diffstat (limited to 'agg-plot/window.cpp')
-rw-r--r--agg-plot/window.cpp 6
1 files changed, 3 insertions, 3 deletions
diff --git a/agg-plot/window.cpp b/agg-plot/window.cpp
index a6d3dbd7..b30a9f68 100644
--- a/agg-plot/window.cpp
+++ b/agg-plot/window.cpp
@@ -9,7 +9,7 @@ extern "C" {
#include "lua-draw.h"
#include "lua-cpp-utils.h"
#include "gs-types.h"
-#include "win-plot-refs.h"
+#include "object-refs.h"
#include "object-index.h"
#include "colors.h"
#include "lua-plot-cpp.h"
@@ -290,7 +290,7 @@ window::cleanup_tree_rec (lua_State *L, int window_index, ref::node* n)
if (ref)
{
if (ref->plot)
- window_plot_ref_remove (L, ref->slot_id, window_index);
+ object_refs_remove (L, table_window_plot, ref->slot_id, window_index);
}
}
@@ -459,7 +459,7 @@ window_attach (lua_State *L)
{
win->draw_slot(slot_id, true);
win->unlock();
- window_plot_ref_add (L, slot_id, 1, 2);
+ object_refs_add (L, table_window_plot, slot_id, 1, 2);
}
else
{
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月16日 22:58:53 +0000

AltStyle によって変換されたページ (->オリジナル) /