Forums > Dev

Knowing why constructor is called

March 10, 2014 | 2:12 am

Hi.

I’d need to know whether a given object is created because it is being loaded from disk or not. I guess I can look at the call stack, but I was wondering if there is some more obvious way – a flag to check in some global variable, or an API call.

Also, if the way to go is climbing the call stack and look for some specific function, what should the function be? I was thinking of fileload_extended() – sounds quite right to me – but can I rely on this in every situation?

Thanks!
andrea


March 10, 2014 | 8:35 am

… apparently, lowload_type() is the function to look for – but I’d still love to go a cleaner way…


Viewing 2 posts - 1 through 2 (of 2 total)