From: John L. <jr...@us...> - 2006-05-14 07:48:14
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1343/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlstate.cpp Log Message: Add classinfo to the encapsulated classes for showing what they are in stacktree show the tracked class types in the stack tree use long for memory pointers not int in AddToTrackedMemory Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** wxlstate.cpp 14 May 2006 00:40:56 -0000 1.67 --- wxlstate.cpp 14 May 2006 07:48:09 -0000 1.68 *************** *** 1526,1530 **** } ! void wxLuaState::AddToTrackedMemoryList(int obj_ptr, wxObject *pObject) { wxCHECK_RET(Ok() && pObject, wxT("Invalid wxLuaState or wxObject to track")); --- 1526,1530 ---- } ! void wxLuaState::AddToTrackedMemoryList(long obj_ptr, wxObject *pObject) { wxCHECK_RET(Ok() && pObject, wxT("Invalid wxLuaState or wxObject to track")); *************** *** 1539,1549 **** if (it != M_WXLSTATEDATA->m_wxlStateData->m_pTrackedList.end()) { ! // remove the item from being tracked ! M_WXLSTATEDATA->m_wxlStateData->m_pTrackedList.erase(it); ! wxObject *pDeleteObject = (wxObject*)it->second; if (fDelete && (pDeleteObject != NULL)) delete pDeleteObject; return true; } --- 1539,1552 ---- if (it != M_WXLSTATEDATA->m_wxlStateData->m_pTrackedList.end()) { ! // always delete the object for the case where it's encapsulated wxObject *pDeleteObject = (wxObject*)it->second; if (fDelete && (pDeleteObject != NULL)) delete pDeleteObject; + it->second = 0; + + // remove the item from being tracked + M_WXLSTATEDATA->m_wxlStateData->m_pTrackedList.erase(it); + return true; } Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wxlbind.cpp 4 May 2006 02:47:34 -0000 1.32 --- wxlbind.cpp 14 May 2006 07:48:09 -0000 1.33 *************** *** 71,78 **** { wxLuaStringToLongHashMap *pHashTable = (wxLuaStringToLongHashMap *)it->second; - wxlState.GetLuaStateData()->m_pDerivedList.erase(it); - if (pHashTable != NULL) delete pHashTable; } --- 71,80 ---- { wxLuaStringToLongHashMap *pHashTable = (wxLuaStringToLongHashMap *)it->second; if (pHashTable != NULL) delete pHashTable; + + it->second = 0; + + wxlState.GetLuaStateData()->m_pDerivedList.erase(it); } *************** *** 400,404 **** // install the classes, functions and methods for (iClass = 0; iClass < m_classCount; ++iClass, ! iTag = registerTypes ? wxlState.tnewtag() : iTag + 1) { WXLUACLASS *pClass = m_classList + iClass; --- 402,406 ---- // install the classes, functions and methods for (iClass = 0; iClass < m_classCount; ++iClass, ! iTag = (registerTypes ? wxlState.tnewtag() : iTag + 1)) { WXLUACLASS *pClass = m_classList + iClass; |