[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] Cloning Global

Hello David,
the best way is to pass the global via some argument list. If this is not possible then you can either choose

global = Global.instance();

which would just reference a previously allocated global.

global = someglobal.getClone(null);

if you want a new object (deep copy)

At which particular place do you have this problem ?


David Hooker wrote:
I have in several places in my code the following:

	global = new Global(Global.instance());

which performs a *shallow* copy, but is now deperecated.  The code says
to use Global.getClone(String[]), but that does a *deep* copy, which I
don't want.  What's my alternative?

Michele Laghi
mailto:laghi at swissinfo.org
tel. +46 8 7492952 / mob. +46 70 4103964