These are chat archives for Fortran-FOSS-Programmers/General-Discussion
@szaghi I've come up with an idea which should work better than the "forced finalisation" approach which I'm using currently. I'll still use my
clean_temp methods, but I'll couple them with an object pool. That way, when a temporary object is ready to be "cleaned", I can simply release it back into the object pool for later reuse and no memory is leaked. A pool of 100 or so should be more than enough for most applications and would have a reasonably manageable minimal memory footprint.
This approach still would not be ammenable to
pure procedures, so you likely won't want to take it. However, I thought it might be worth mentioning on here in case anyone else is interested. Note that I have not actually tested it yet, or done more than sketch out the basic details.