Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

The heck?

Name: Anonymous 2010-11-26 10:57


Type1[][] backup = (Type1[][])this.original.clone();

/*
 * Some processing going on in original array
 *
 *
 * For debugging purposes I check backup and it has change
 */

this.original = backup; //no that important; backup changed before this


Can anybody hint out what's happening. I didn't touch backup in the whole processing. Isn't clone supposed to create new clone instead of just copying over the reference variable? Or do I perhaps need to override clone() with a custom method because perhaps it doesn't work properly with custom types (such as type1 above)? Or am I just talking bunkers?   I

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List