Follow-up Comment #4, patch #2218 (project freeciv):
There are still losses of memory. When calling
_tile_data_cache_hash_replace(key, data)_, then data will be duplicated
inside (because _SPECHASH_DATA_COPY_ has been defined). So you need to free
the pointer after that.
So, there are 2 solutions:
* You still define _SPECHASH_DATA_COPY_ and pass a built-in structure to
_tile_data_cache_hash_replace()_ which will be duplicated internally.
* Then, you remove the definition of _SPECHASH_DATA_COPY_. Then, the pointer
you passed to _tile_data_cache_hash_replace()_ will be returned with
_tile_data_cache_hash_lookup()_.
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?2218>
_______________________________________________
Message posté via/par Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev