ciao , ho trovato il seguente codice :
che serve per aggiungere le informazioni di riga e file ai memori leak trovati , in vs 2003 .net(c++)codice:// DbgNew.h // Defines global operator new to allocate from client blocks #ifdef _DEBUG #define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__) #else #define DEBUG_CLIENTBLOCK #endif // MyApp.cpp // Compile options needed: /Zi /D_DEBUG /MLd or use a // Default Workspace for a Console Application to build a debug version #include <crtdbg.h> #include <dbgnew.h> #ifdef _DEBUG #define new DEBUG_CLIENTBLOCK #endif int main( ) { int* array = new int[10]; _CrtMemDumpAllObjectsSince(NULL); return 0; }
il problema è che la redifinizione del new su ad es puntatori a mappe :
m_pMapCoordJoints = new map<int, tagJointPoints*>()
mi da degli errori , del tipo:
c:\MyProjects\CmpFrg\CmpImportApi\FileModelAPIRead er.cpp(5384): error C2143: syntax error : missing ';' before '<template-id>'
cosa puo essere?
sono i parametri della dichiarazione new che variano?
grazie.

Rispondi quotando