Closed armgong closed 11 months ago
Hi thanks for the observation, the short solution since it's a small 16 byte onetime leak (in x64) and will never leak further memory as you use it, you can disable this behaviour by going to : [Project] - > [Project Options] -> select [Debugging] -> uncheck [Use Heaptrc unit...]
The long explanation is that I kept the heap tracker ON in the example for debugging, however, the memory leak in this case is due to the "ORTEnv" automatic allocation which is happening one time only during the programme launch, taking little two blocks and because of a conflict between onnxruntime memory management and the internal pascal housekeeping mechanism, having said that, it will never go beyond that 16 bytes even while extensive model load/usage or frequent inferences or trainings, this should be insignificant and has no side-effects on the memory knowing that it will be freed once the program exit anyway, until I find a better workaround, it's not an issue for now.
If you have a special case that unusually affects performance or memory using this library compared to other implementations (for example Python implementation takes ~150% more memory for a lesser performance in CPU), please let me know about it and I'll try to help otherwise it should work as expected.
Finally, please star this project, it will encourage uploading further and more interesting native pascal AI and Data Science related projects. H
Compile fastercnn10 using Lazarus (master branch) on windows 10 64, just start it then close. Lazarus reported "2 unfreed memory blocks : 8"