Open PGS62 opened 5 years ago
Awesome!
That's great feedback, thanks! Something to keep in mind when #2522 is closed: we will still want to warn about the possibility of a memory leak even when we pick up a ReDim
declaration as a declaration - that inspection result for an undeclared variable is currently considered a false positive!
Hi there,
I've only recently discovered Rubberduck, though I've got many years' experience of VBA.
I have some code for solving systems of non-linear equations, which is a port (not by me) from Fortran of "MINPACK" (https://en.wikipedia.org/wiki/MINPACK). It works very well, but for ages I've known that it leaks memory (call it in an infinite While loop and use task manager to watch the memory leaking away).
I never got far with fixing that, and had to live with it. But Rubberduck's code inspection listed variables as not declared, which took me by surprise since it's all Option Explicit.
The problem was using Redim without first using Dim. Fixed that and the memory leak's gone :-)
So, Thanks!
Philip