MantisBT - VCMI
View Issue Details
0001697VCMIMechanics - Adventure Mappublic2014-02-09 16:172023-11-28 14:06
beegee 
SXX 
normalmajorhave not tried
resolvedfixed 
 
 
0001697: Starting options and initial options won't be deleted from memory
Starting options and initial options won't be deleted from memory after CGamestate has been deleted. When that options won't be deleted, the campaign state information won't be freed from memory too. Campaign state contains crossover hero instances (with stack data and more) which won't be freed as well.


This point affects internal stuff of game engine and can't be tested by a tester.
Destructor of CGameState
//delete scenarioOps; //TODO: fix for loading ind delete
//delete initialOpts;
No tags attached.
Issue History
2014-02-09 16:17beegeeNew Issue
2014-02-09 16:22beegeeSummaryfor Developers: Starting options and initial options won't be deleted from memory => Starting options and initial options won't be deleted from memory
2014-02-09 16:22beegeeDescription Updatedbug_revision_view_page.php?rev_id=2506#r2506
2014-02-09 22:21TowNote Added: 0004458
2016-08-28 03:49SXXAssigned To => SXX
2016-08-28 03:49SXXStatusnew => assigned
2023-11-28 14:06IvanNote Added: 0008872
2023-11-28 14:06IvanStatusassigned => resolved
2023-11-28 14:06IvanResolutionopen => fixed

Notes
(0004458)
Tow   
2014-02-09 22:21   
So it is. Deep copy of hero brings quite a number of other objects, like CHero, CCreate, CArtifact and whatever is reachable.
Still, rather than fix these issues one by one (there's likely quite a number of various leaks) and bother with manual memory management, I would like to see a bigger update introducing smart pointers (with a a few rules to avoid cycles), so the issue will be properly gone for good.
Still, this is blocked by the limitation of our serializer.
(0008872)
Ivan   
2023-11-28 14:06   
Fixed in 1.4