Hi there,
currently I have a problem with leaking memory and I am at my wits end to track it down. The code is rather long, so no sense in posting it here, but I try to describe how my program works.
My variables are of derived type, a mixture of integers and reals, no matrices or arrays. They are organised in a linked list. The type definition of variables and pointers are done in a module, each procedure to access the data has a use-statement to this module
In a loop new data are generated which are sorted into the linked list and some data are destroyed. The list typically holds bout 3,000 to 4,000 items with about 40 to be added and removed each time my main loop is processed.
For debugging I have a count of allocations and deallocations running which shows a balance exact as it should be, namely the number of the active items as open allocations.
Some procedures to manipulate the data use their local set of pointers which get nullified manually when the precedure terminates.
But still I have an increase of memory as monitored with Task Manager from about 28 MB at startup to 76 MB after 3,000 cycles, while the memory consumption is about 36 MB when my linked list is fully loaded.
So what can I do? Is there a useful strategy to track down this memory leak? Are there tools around to check for memory leaks? Should I use another approach?
I am using Plato and FTN95 version 8.80, compiling /64 and running in a windows 11 environment. I use clearwin+ with format windows with /og graphic.
Any idea?