- fixed memory leak in the parameter list method clone()
- removed useless parameter list method set_options() (usage caused memory leak)
This commit is contained in:
parent
a31ba3c195
commit
fbd61d0a00
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: siminterface.cc,v 1.123 2006-02-28 14:02:06 vruppert Exp $
|
||||
// $Id: siminterface.cc,v 1.124 2006-02-28 16:19:28 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// See siminterface.h for description of the siminterface concept.
|
||||
@ -1684,7 +1684,7 @@ bx_list_c* bx_list_c::clone()
|
||||
bx_list_c *newlist = new bx_list_c(NULL, name, title->getptr(), maxsize);
|
||||
for (int i=0; i<get_size(); i++)
|
||||
newlist->add(get(i));
|
||||
newlist->set_options(get_options());
|
||||
newlist->get_options()->set(options->get());
|
||||
return newlist;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: siminterface.h,v 1.167 2006-02-27 09:37:58 vruppert Exp $
|
||||
// $Id: siminterface.h,v 1.168 2006-02-28 16:19:29 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Intro to siminterface by Bryce Denney:
|
||||
@ -1078,7 +1078,6 @@ public:
|
||||
bx_param_c *get_by_name(const char *name);
|
||||
int get_size() { return size; }
|
||||
bx_param_num_c *get_options() { return options; }
|
||||
void set_options(bx_param_num_c *newopt) { options = newopt; }
|
||||
bx_param_num_c *get_choice() { return choice; }
|
||||
bx_param_string_c *get_title() { return title; }
|
||||
void set_parent(bx_param_c *newparent);
|
||||
|
Loading…
x
Reference in New Issue
Block a user