Using Reference in c++ -


i using global instance of class class a; a1; using global variable in other functions using reference a& a2 = a1; such changes done locally reflected globally. wanted check whether destructor a2 called local scope ends?

please clarify.

a2 reference not have destructor.

the destructor a1 called when program exits. expecting happen when a2's local scope ends?


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -