[geos-devel] Question about geos::io::Unload::Release()
Mateusz Łoskot
mateusz at loskot.net
Mon Mar 13 07:43:37 EST 2006
strk at refractions.net wrote:
> On Sun, Mar 12, 2006 at 12:45:31PM +0100, Mateusz Å?oskot wrote:
>
>>strk at refractions.net wrote:
>>
>>>static lifetime should be ok. I dunno if it's used by client code,
>>>anyway it might be useful to have a 'default' factory to use instead
>>>of having to construct (and maintain alive) a custom one. I'd move
>>>access to it to GeometryFactory::defaultInstance()
>>
>>I see the idea behind default factory.
>>So, I'd make it a singleton, constructed on first request of its
>>instance. As I understand defaultInstance() is sucha a solution.
>>The only problem is to properly define Singleton class.
>>
>>Here is some simple proposal:
>
>
> ... mmm .. simple ? :)
> How about:
>
One note more, this is so called Scott Meyers' singleton.
Here is deeper explanation of possible problems.
I'd suggest to consider them too, especially to run this example:
http://www.gamedev.net/columns/gameengineering/singleton/breakmeyer.zip
Article:
http://www.gamedev.net/reference/articles/article1825.asp
Cheers
--
Mateusz Łoskot
http://mateusz.loskot.net
More information about the geos-devel
mailing list