nasa / EdsLib

CCSDS SOIS Electronic Data Sheet Tool and Library
Apache License 2.0
31 stars 12 forks source link

Python binding memory leak fixes #6

Closed mjmccaskey closed 3 years ago

mjmccaskey commented 3 years ago

This update includes several memory leak fixes in the python bindings:

EdsLib Database Entry creation: init function EdsLib Database Entry container iterator: iter_next EdsLib Database Entry enumeration iterator: iter_next CFE_MissionLib Database Iterator: iter_next CFE_MissionLib Interface Iterator: iter_next CFE_MissionLib Topic Iterator: iter_next CFE_MissionLib Database: SetPubSub method CFE_MissionLib Database: DecodeEdsId method

Most of the memory leaks came from not decrementing reference counts to temporary python objects appropriately. I've created a simple python script to test all of these cases and they no longer leak memory.

There are also many formatting updates throughout these files.

jphickey commented 3 years ago

Superceded by PR #7 ... as that PR contains everything this one did plus another commit.