Andy Croft asks:
> > To clarify, I'll have a $thing I've whipped up created every time a group
> > of players enter combat that acts as a "referee". At the end of combat, the
> > referee object is destroyed. Now, after a year of 10 to twenty players
> > duking it out will Cold be able to handle it? Bear in mind I'm still new to
> > a powerful OOP environment like Cold. Please save the diesel fuel and
> > matches, I'm painfully aware of my incompetence with Cold. <GRIN>
Bruce writes:
> Why not just create them as needed and when done with the match, return
> them to a pool of un-managed referee objects? That way, if you only
> ever have 10 matches at once, you only really need to create 10 refereee
> objects, rather than an endless cycle of create+destroy.
Just out of curiosity, what's wrong with an endless
create/destroy cycle?
I'm mostly a spectator on the cold list, but this general topic
gets discussed a lot in Java circles, because object instantiation is
so expensive in Java. The general tone, though, is that creating and
destroying would be a more elegant design, if not for the limitations
of the language environment.
So is your preference environment motivated or design motivated,
and in either case, could you shed a little more light on the "why" of
the topic?
Steven J. Owens
puff@netcom.com
|