mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
Destructor restart fixes
This commit is contained in:
parent
940afad3f5
commit
e476f1fa9b
@ -97,7 +97,7 @@ BaseIntegrationGroup::swap (
|
||||
BaseIntegrationGroup::~BaseIntegrationGroup (
|
||||
void)
|
||||
{
|
||||
Er7UtilsDeletable::delete_instance (integ_controls);
|
||||
alloc::delete_object (integ_controls);
|
||||
}
|
||||
|
||||
|
||||
|
@ -177,7 +177,10 @@ namespace er7_utils {
|
||||
template <typename T>
|
||||
inline void delete_object (T*& obj) {
|
||||
if (obj) {
|
||||
TMM_delete_var_a (type_traits::get_allocated_pointer (obj));
|
||||
if (get_alloc_info_of(obj) != 0x0)
|
||||
{
|
||||
TMM_delete_var_a (type_traits::get_allocated_pointer (obj));
|
||||
}
|
||||
obj = 0;
|
||||
}
|
||||
}
|
||||
|
@ -72,15 +72,31 @@ Trick::IPPythonEvent::IPPythonEvent() {
|
||||
|
||||
Trick::IPPythonEvent::~IPPythonEvent() {
|
||||
|
||||
for (int ii=0; ii<condition_count; ii++) {
|
||||
TMM_delete_var_a(condition_list[ii]);
|
||||
if (TMM_is_alloced((char *)condition_list))
|
||||
{
|
||||
for (int ii=0; ii<condition_count; ii++) {
|
||||
if (TMM_is_alloced((char *)condition_list[ii]))
|
||||
{
|
||||
TMM_delete_var_a(condition_list[ii]);
|
||||
}
|
||||
condition_list[ii] = 0x0;
|
||||
}
|
||||
TMM_delete_var_a(condition_list);
|
||||
}
|
||||
TMM_delete_var_a(condition_list);
|
||||
condition_list = 0x0;
|
||||
|
||||
for (int ii=0; ii<action_count; ii++) {
|
||||
TMM_delete_var_a(action_list[ii]);
|
||||
if (TMM_is_alloced((char *)action_list))
|
||||
{
|
||||
for (int ii=0; ii<action_count; ii++) {
|
||||
if (TMM_is_alloced((char *)action_list[ii]))
|
||||
{
|
||||
TMM_delete_var_a(action_list[ii]);
|
||||
}
|
||||
action_list[ii] = 0x0;
|
||||
}
|
||||
TMM_delete_var_a(action_list);
|
||||
}
|
||||
TMM_delete_var_a(action_list);
|
||||
action_list = 0x0;
|
||||
}
|
||||
|
||||
void Trick::IPPythonEvent::set_python_processor(Trick::IPPython * in_ip) {
|
||||
|
Loading…
Reference in New Issue
Block a user