|
Boost : |
From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2005-07-19 12:02:46
"Jason Hise" wrote:
[ policies ]
> Granted, defining a category like so is a bit more work, but client code
> can completely ignore policies that it doesn't care about, and reuse
> useful categories that it has defined for multiple different singleton
> types.
>
If the function destroy() would be renamed to
ensure_resource_is_freed()
or so no "on-double-destroy" policy may be needed.
Such name would also give hint about expected result
rather than about internal implementation.
---------------
About macros: one should keep them out
when possible.
If the library will (in the future) handle "application-wide-singletons"
(a type would be singletonn even if put in static library
linked into a DLL that is manually loaded in an EXE)
then some macros will be (likely) necessary.
/Pavel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk