I have a memory leak in an app that seems to be leaking arrays which is a bit of a mystery to me unless I have an array of arrays somewhere that I’m not remembering or unless the array holds an object that holds a reference to the array or something interesting like that which is possible. But then I would expect to see a leak of those objects as well which I am not able to track.
I have a debugging method in the app that I can call which uses introspection to walk all the objects currently alive in the program and counts them by type so I can see that my app has 53791 array objects in it at the moment up from 53170 just 15 minutes ago. The numbers do not increase regularly, they are definitely in response to something the program is doing but I’ll be darned if I can figure out where they are.
I thought it might help finding just where they are going missing if I could also use introspection to find out what property type is being held in the array or something like that. Not having used introspection for anything in my life other than the object counting method mentioned above and cutting and pasting the exception handler example from the language reference I’m evidently not familiar enough with it to get this to work. I seem to be having problems this morning even getting some of the example code from the language reference to even compile for me.
Any suggestions on how I might get more info out of these array objects, what they are, what their parent objects or modules are that would be very helpful!