Will resetting an object be less expensive then reinstantiating?
From: Inertia_sublimation (inertia_sublimation_at_hotmail.com)
Date: 02/28/04
- Next message: Lloyd: "Re: Getting string from an Arraylist?"
- Previous message: Sonja: "Re: Newbie Question: Which IDE Should I Start With"
- Next in thread: Jon A. Cruz: "Re: Will resetting an object be less expensive then reinstantiating?"
- Reply: Jon A. Cruz: "Re: Will resetting an object be less expensive then reinstantiating?"
- Reply: Doug Pardee: "Re: Will resetting an object be less expensive then reinstantiating?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 28 Feb 2004 03:15:10 GMT
Hi everyone!
I was wondering, I've been doing some work with GridBagLayout, and have
noticed my overuse of
"= new GridBagCostraints". I decided to create a new class,
ReusableGridBagComponents, inherit from
GBC, and make a reset method. This reset method would reset the GBC's public
fields to their default values,
so I can use the same GBC to position a new component. (I'll just pass that
same RGBC to the getContentPane().add() method.)
Does this have any consequences to it? I had the mentality that more objects
== more heap use, so it was best to conserve that heap space.
Thanks in advance!
- Next message: Lloyd: "Re: Getting string from an Arraylist?"
- Previous message: Sonja: "Re: Newbie Question: Which IDE Should I Start With"
- Next in thread: Jon A. Cruz: "Re: Will resetting an object be less expensive then reinstantiating?"
- Reply: Jon A. Cruz: "Re: Will resetting an object be less expensive then reinstantiating?"
- Reply: Doug Pardee: "Re: Will resetting an object be less expensive then reinstantiating?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|