Print

Print


DefaultEnv::Finalize is called as a result of destroying the EnvInitializer object which is static. This is called after the program's exit function and after all stack objects have been destroyed. Therefore, we don't need to worry about client stack objects still accessing the sPostMaster value.

Now, the dynamically allocated object should be properly destroyed by the client. If they fail to do this before the exit call then this is an application error. If they are automatically managed i.e. shared_ptr then they fall in the previous category of stack objects. So, how can an user object still refer to us in this case? Shouldn't all user object be destroyed by the time we get to the Finalize method. Of course, except the user static ones ...


Reply to this email directly or view it on GitHub.



Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1