From 4ec0150a460423e1b8fbaa7b9d674385bdfc5cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Sun, 9 Sep 2001 23:00:05 +0000 Subject: [PATCH] fix leak git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2714 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/FormMathsBitmap.C | 6 +++--- src/frontends/xforms/FormMathsBitmap.h | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/frontends/xforms/FormMathsBitmap.C b/src/frontends/xforms/FormMathsBitmap.C index db4a450c5c..50c5f27f2c 100644 --- a/src/frontends/xforms/FormMathsBitmap.C +++ b/src/frontends/xforms/FormMathsBitmap.C @@ -50,7 +50,7 @@ FormMathsBitmap::FormMathsBitmap(LyXView * lv, Dialogs * d, FL_FORM * FormMathsBitmap::form() const { - return form_; + return form_.get(); } @@ -60,7 +60,7 @@ void FormMathsBitmap::build() h_+= 50; // Allow room for a Close button - form_ = fl_bgn_form(FL_UP_BOX, w_, h_); + form_.reset(fl_bgn_form(FL_UP_BOX, w_, h_)); form_->u_vdata = this; FL_OBJECT * obj = fl_add_box(FL_UP_BOX, 0, 0, w_, h_, ""); @@ -70,7 +70,7 @@ void FormMathsBitmap::build() it < bitmaps_.end(); ++it) { FL_OBJECT * obj = it->get(); - fl_add_object(form_, obj); + fl_add_object(form_.get(), obj); bc().addReadOnly(obj); y_ = max(y_, obj->y + obj->h); diff --git a/src/frontends/xforms/FormMathsBitmap.h b/src/frontends/xforms/FormMathsBitmap.h index 0370b5afbf..ed39b6c153 100644 --- a/src/frontends/xforms/FormMathsBitmap.h +++ b/src/frontends/xforms/FormMathsBitmap.h @@ -13,7 +13,6 @@ #define FORM_MATHSBITMAP_H #include -//#include #include "support/smart_ptr.h" #ifdef __GNUG__ @@ -27,11 +26,15 @@ * This class provides an XForms implementation of a maths bitmap form. */ class FormMathsBitmap : public FormMathsSub { + /// friend class FormMathsPanel; - public: +public: /// typedef lyx::shared_c_ptr bm_ptr; + /// + typedef lyx::shared_c_ptr fl_ptr; + /// FormMathsBitmap(LyXView *, Dialogs * d, FormMathsPanel const &, std::vector const &); @@ -58,7 +61,7 @@ private: /// The latex name chosen string latex_chosen_; /// Real GUI implementation - FL_FORM * form_; + fl_ptr form_; /// The bitmap tables std::vector bitmaps_;