Global scope should work as any scope, and call destructors when ending. > adianv said: why should it be called ? x is global and gets never out of > scope.
The whole point on RAII is to be abble to bind the lifetime of a resource to the lifetime of an object, to make sure the resource is released properly. Your point is valid if the resource is memory, it might not be for other kinds of resources.