I think I have sorted myself out.
Yes I knew my QB64 program had a memory leak (and because not having enough FREEIMAGE img& for every LOADIMAGE).
My problem was affected by the bulk of the program written over a year ago and very recently some condition checks inserted between a LOADIMAGE and the matching FREEIMAGE. To minimize this problem I have tried to keep the
LOADIMAGE PUTIMAGE FREEIMAGE as a tight cluster (often on the same QB64 IDE line) and now only about 0.01% of the time it is observed that a known LOADIMAGE will fail (which will now produce a relatively slow memory leak).
As well as Windows Task Manager being used to check for memory leaks - my program determines the free physical RAM memory.
It is interesting that although my program is "memory leaking" at now a rough estimate of 1 Gbyte per week (which is acceptable and manageable for me) - it appears that Windows is "memory leaking" much faster (e.g. by about 8-4 -> ~4 Gbyte over 12 hours. Task Manager reports ~87% memory useage (the big processes are Windows Explorer and Microsoft Edge at 1-2 GByte each).
On first sight, doing the "math", there does not appear to be any sensible correlation being Task Manager Memory% report and a command line free physical memory report.
My best guide now is the free physical memory being updated many times a minute and being displayed on the QB64 program TITLE bar (as well as the LOADIMAGE img& handle value at any time).
So in summary the pseudo code of my program is like so
LOOP
LOADIMAGE PUTIMAGE FREEIMAGE handle
LOADIMAGE PUTIMAGE FREEIMAGE handle
LOADIMAGE PUTIMAGE FREEIMAGE handle
LOADIMAGE - timing problem 0.01% of time - attempt to FREEIMAGE fails - resulting in next time to this line img& handle value is -9 (and subsequently in time sequence -8 -7 -6 -5 -4 -3 -13 -14 -15 -16 -17...)
LOADIMAGE PUTIMAGE FREEIMAGE handle
LOADIMAGE PUTIMAGE FREEIMAGE handle
LOADIMAGE PUTIMAGE FREEIMAGE handle
END LOOP
So as a temporary work-around - use ErrHandler routine with RESUME NEXT for the known error which will occur about 0.01% of the time, let it "memory leak" (at a rate of about 1 Gbyte per week) - but watching the QB64 TITLE bar freePhysicalMemory which indicates a memory leak of about 4 GByte per 12 hours - and auto terminate the QB64 program before Windows "locks up" (typically for me before a 3-day session).
I will try to "fine-tune" the ErrHandler routine (by experimenting) but any gains will not offset the Windows "memory leak"
@Petr - thanks for the suggestion but deleting out img& = 0 did not solve anything (I have changed my code a bit not to rely on img& =0).
@Richard Frost My laptop (about 5 years old) runs hot anyway - the specifications I think stated vent output temperature of 40-60 C and so when I have the laptop on my lap I probably could "fry eggs". The internal thermal design (one heat-sink heat-pipe heat-sink+fan system) on purpose only services a portion of the processor zones). When only a few processors are running the overall temperature is significantly lower that at "full blast". I think the reason it was designed this way (apart from saving $ on heat pipes) was that I gather the laptop was meant to be a server which does not matter if it runs hot. As far as removing BTU's (heat) is concerned - the greater the temperature differential = the greater the BTU's removed by the same small sized fan - so run "hot" and get away with using a smaller fan.