Changeset 740 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/DebugMiddleFile.cpp
- Timestamp:
- Sep 6, 2008, 11:53:33 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/DebugMiddleFile.cpp
r637 r740 437 437 438 438 439 CDBDebugSection::CDBDebugSection() {440 ppobj_ds=(CDebugSection **)HeapAlloc(hHeap,0,1); 441 num=0; 442 } 443 CDBDebugSection::~CDBDebugSection(){444 int i;445 for(i=0;i<num;i++){446 delete p pobj_ds[i];447 } 448 HeapDefaultFree(ppobj_ds);439 CDBDebugSection::CDBDebugSection() 440 { 441 } 442 CDBDebugSection::~CDBDebugSection() 443 { 444 BOOST_FOREACH( CDebugSection *pDebugSection, debugSections ) 445 { 446 delete pDebugSection; 447 } 448 debugSections.clear(); 449 449 } 450 450 … … 458 458 } 459 459 460 ppobj_ds=(CDebugSection **)HeapReAlloc(hHeap,0,ppobj_ds,(num+1)*sizeof(CDebugSection *)); 461 ppobj_ds[num]=pobj_d; 462 num++; 460 debugSections.push_back( pobj_d ); 463 461 464 462 return 1; … … 466 464 467 465 void CDBDebugSection::del(HMODULE hModule){ 468 int i; 469 for(i=0;i<num;i++){ 470 if((HMODULE)(ULONG_PTR)ppobj_ds[i]->dwImageBase==hModule){ 471 delete ppobj_ds[i]; 472 473 num--; 474 for(;i<num;i++){ 475 ppobj_ds[i]=ppobj_ds[i+1]; 476 } 466 for( int i=0; i<static_cast<int>(this->debugSections.size()); i++ ) 467 { 468 if( (HMODULE)(ULONG_PTR)this->debugSections[i]->dwImageBase == hModule ) 469 { 470 delete debugSections[i]; 471 Jenga::Common::EraseVectorItem<std::vector<CDebugSection *>>( debugSections, i ); 477 472 break; 478 473 } … … 480 475 } 481 476 482 void CDBDebugSection::choice(int index){ 483 pobj_now=ppobj_ds[index]; 477 void CDBDebugSection::choice( int index ) 478 { 479 pobj_now = debugSections[index]; 484 480 pobj_now->choice(); 485 481 }
Note:
See TracChangeset
for help on using the changeset viewer.