gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/window-cpp.h
diff options
context:
space:
mode:
authorfrancesco-ST <francesco.abbate@st.com>2010年08月12日 15:10:57 +0200
committerfrancesco-ST <francesco.abbate@st.com>2010年08月12日 15:10:57 +0200
commit11e74b41cb7712913d55942fdfe32770a5738475 (patch)
treeb3b8caa200ef1af74f01698ffc28fcf500a9c07d /agg-plot/window-cpp.h
parentb55a4cf705a06ef2c9995da4d2784e8d5969ee3e (diff)
downloadgsl-shell-11e74b41cb7712913d55942fdfe32770a5738475.tar.gz
fixed cleanup procedure to unreference plots
Diffstat (limited to 'agg-plot/window-cpp.h')
-rw-r--r--agg-plot/window-cpp.h 13
1 files changed, 11 insertions, 2 deletions
diff --git a/agg-plot/window-cpp.h b/agg-plot/window-cpp.h
index e5d6292e..3f6edf53 100644
--- a/agg-plot/window-cpp.h
+++ b/agg-plot/window-cpp.h
@@ -30,17 +30,26 @@ class window : public canvas_window {
split::node<ref>* m_tree;
void draw_rec(split::node<ref> *n);
+ void cleanup_tree_rec (lua_State *L, int window_index, split::node<ref>* n);
public:
- window(agg::rgba& bgcol) : canvas_window(bgcol), m_tree(0) {};
+ window(agg::rgba& bgcol) : canvas_window(bgcol), m_tree(0)
+ {
+ this->split(".");
+ };
- ~window() { if (m_tree) delete m_tree; };
+ ~window() { delete m_tree; };
static window *check (lua_State *L, int index);
void split(const char *spec);
int attach(lua_plot *plot, const char *spec, int id);
+ void cleanup_refs(lua_State *L, int window_index)
+ {
+ cleanup_tree_rec (L, window_index, m_tree);
+ };
+
void on_draw_unprotected();
virtual void on_draw();
};
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月18日 20:39:56 +0000

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