Can one add code that executes before the GC and any memory is normally allocated(even static) and after all of it was suppose to be released?

A sort of static this for the whole app. I would like to monitor the memory of the app to make sure that the total memory before and after is equal. I use my own memory routines but would like something where I can write out the information after all destructors have been called.

I have malloc and free wrapped and simply add the total memory used and released. These, of course, should be the same *after* program termination. But, I can't wait that long ;)


Reply via email to