[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re: [xmlblaster] i got a question about Global in cpp client
I had checked Global.h from cvs. I wrote like these:
Global& globTMP = Global::getInstance();
And runtime error is:
WARN Global ::initialize: the global is already initialized.
Ignoring this initialization
please give me more advise.
======= 2004-05-19 16:49:51 has been wrote：=======
>I made the Global copy constructor public (the code is on the cvs). Note
>that you are responsible for the management of the "copy" Global. You
>must ensure in your code to delete this "copy" Global before the
>mananged Global (i.e. the one which you get with getInstance).
>> There has a getClone() method in Global.java to get a deep copy of
>> the global instance,but there miss in cpp code.
>> I want to get a deep copy of the global object in my cpp client,but
>> the Global in cpp client is singleton instance, and changing the singleton
>> model looks like unwise, can you me any suggestion?
>mailto:laghi at swissinfo.org
>tel. +46 8 7492952 / mob. +46 70 4103964
= = = = = = = = = = = = = = = = = = = =
pikaiyuan at 163.com