× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> From: furgalj@xxxxxxxxxxxxxxxx
> 
> Joe, maybe I'm stating the obvious here, and you've already looked
into
> this, but if not, it might be worth a try. I believe what you need is
a
> custom class loader.

Actually, with Barbara's input, it was pretty simple to do what I
needed.  I designed a variant of a Factory object.  I pass the class
name into the factory's method, it instantiated the object and invoked
the appropriate method of the instantiated object.

By the way, passing in a data structure as an array of bytes and getting
it back out is pretty straightforward.  I like it because I don't have
to create any Strings - I only create one object in my entire RPG
program: the factory object.

Barbara, if you're still listening: do I have to do anything special to
make sure that factory gets garbage collected?  Given the fact that I
only create one per call to the program, and the program is the type
that is called dozens or hundreds (rather than millions) of times, my
guess is that even if the factories don't get collected, I can just
leave them until the job ends.  (Since the factory is creating it's own
objects, I assume they get GC'd as normal.)

Joe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.