This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 325 for ps


Ignore:
Timestamp:
05/30/04 03:57:26 (21 years ago)
Author:
markt
Message:

Fixing leaks.

Location:
ps/trunk/source/simulation
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/source/simulation/BaseEntity.cpp

    r284 r325  
    1515// automatically use namespace ..
    1616XERCES_CPP_NAMESPACE_USE
     17
     18CBaseEntity::~CBaseEntity()
     19{
     20    if( m_bound_box )
     21        delete( m_bound_box );
     22    if( m_bound_circle )
     23        delete( m_bound_circle );
     24}
    1725
    1826bool CBaseEntity::loadXML( CStr filename )
     
    127135
    128136        }
    129 
     137        delete errorHandler;
    130138        delete parser;
    131139    }
  • ps/trunk/source/simulation/BaseEntity.h

    r284 r325  
    2929public:
    3030    CBaseEntity() { m_bound_circle = NULL; m_bound_box = NULL; }
     31    ~CBaseEntity();
    3132    // Load from XML
    3233    bool loadXML( CStr filename );
  • ps/trunk/source/simulation/BaseEntityCollection.cpp

    r308 r325  
    3232    dude->m_speed *= 10.0f;
    3333
    34 /*
    35 
    36     // Nasty evil wicked hardcoding.
    37     CBaseEntity dude;
    38     dude.m_name = CStr( "Prometheus Dude" );
    39     dude.m_actorObject = g_ObjMan.FindObject( "The Dude" );
    40     dude.m_actorObject->m_Model->GetAnimation()->m_FrameTime /= 3.0f;
    41     dude.speed = 0.3f;
    42 
    43     addTemplate( dude );
    44 */
    4534}
    4635
  • ps/trunk/source/simulation/EntityManager.cpp

    r284 r325  
    1010
    1111CEntityManager::~CEntityManager()
    12 {
     12{   
    1313    m_extant = false;
     14    for( int i = 0; i < MAX_HANDLES; i++ )
     15        if( m_entities[i].m_refcount )
     16            delete( m_entities[i].m_entity );
    1417}
    1518
Note: See TracChangeset for help on using the changeset viewer.