
13 Jan
2005
13 Jan
'05
10:59 p.m.
Scott Woods wrote:
The "typical problem" is that objects in any substantial application want to be destroyed in a runtime-dependent order. The exact order is driven by what activity occurs during execution. Trying to dictate an order (i.e. longevity-int) onto something that is dynamic is... misdirected.
For this "typical problem", wouldn't it make sense to simply use a dependency oriented lifetime? This way there is no need to keep track of the ints across the application, and singletons are created exactly when they are needed and destroyed as soon as they are no longer required. -Jason