diff --git a/include/trick/MemoryManager.hh b/include/trick/MemoryManager.hh index 6f98c8ad..8227f568 100644 --- a/include/trick/MemoryManager.hh +++ b/include/trick/MemoryManager.hh @@ -309,7 +309,7 @@ namespace Trick { @param var_name - the address of the variable. @return 0 = SUCCESS, 1 = FAILURE */ - int delete_var(const char* var_name); + int delete_var(std::string var_name); /** Forget about the external variable at the given address. DOES NOT attempt to deallocate the @@ -325,7 +325,7 @@ namespace Trick { @param var_name - the address of the external variable. @return 0 = SUCCESS, 1 = FAILURE */ - int delete_extern_var(const char* var_name); + int delete_extern_var(std::string var_name); /** Checkpoint all allocations known to the MemoryManager to the given stream. diff --git a/trick_source/sim_services/MemoryManager/MemoryManager_delete_var.cpp b/trick_source/sim_services/MemoryManager/MemoryManager_delete_var.cpp index cd5a17f8..4bde1c45 100644 --- a/trick_source/sim_services/MemoryManager/MemoryManager_delete_var.cpp +++ b/trick_source/sim_services/MemoryManager/MemoryManager_delete_var.cpp @@ -110,7 +110,7 @@ int Trick::MemoryManager::delete_var(void* address ) { } // MEMBER FUNCTION -int Trick::MemoryManager::delete_var( const char* name) { +int Trick::MemoryManager::delete_var( std::string name) { VARIABLE_MAP::iterator pos; ALLOC_INFO *alloc_info; @@ -140,7 +140,7 @@ int Trick::MemoryManager::delete_extern_var( void* address) { } // MEMBER FUNCTION -int Trick::MemoryManager::delete_extern_var( const char* name) { +int Trick::MemoryManager::delete_extern_var( std::string name) { // delete_var will remove the external variable from the allocation map return delete_var(name) ; }