Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

Remove some duplicate map save directives that can break the map buffer

Open kevingranade opened this issue 1 year ago • 0 comments

Summary

None

Purpose of change

While doing some intensive mapgen testing I found that some map extras were occasionally triggering a memory leak when generating and deleting an OMT repeatedly. (this isn't exactly a normal use case, but fixing it is harmless so...). I tracked it down to these, which are causing problems because they trigger map::save() twice on the same area, invalidating mapbuffer assumptions.

Describe the solution

Just remove the calls to map::save(), they're guaranteed to be handled by the caller.

Testing

This resolved my memory leak across a huge number of iterations.

kevingranade avatar Mar 24 '24 19:03 kevingranade