T
tech
Is it ok to allow another object to own a singleton object, or is
this definitely a NO NO.
I have a utility class that i want to provide access to a whole group
of subobjects so i can make
this utility a singleton. But i was wondering if i can have it owned
by a top level object
which encompasses all the other subobjects(which would use the
singleton utility)
so there shouldn't be any refs to the handle floating around when the
top level is destroyed
and it would of course destroy the singleton.
this definitely a NO NO.
I have a utility class that i want to provide access to a whole group
of subobjects so i can make
this utility a singleton. But i was wondering if i can have it owned
by a top level object
which encompasses all the other subobjects(which would use the
singleton utility)
so there shouldn't be any refs to the handle floating around when the
top level is destroyed
and it would of course destroy the singleton.