mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
fix leak
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2714 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
271f8d7eec
commit
4ec0150a46
@ -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);
|
||||
|
@ -13,7 +13,6 @@
|
||||
#define FORM_MATHSBITMAP_H
|
||||
|
||||
#include <vector>
|
||||
//#include <boost/smart_ptr.hpp>
|
||||
#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<FL_OBJECT> bm_ptr;
|
||||
///
|
||||
typedef lyx::shared_c_ptr<FL_FORM> fl_ptr;
|
||||
|
||||
///
|
||||
FormMathsBitmap(LyXView *, Dialogs * d, FormMathsPanel const &,
|
||||
std::vector<string> 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<bm_ptr> bitmaps_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user