[Xotcl] Class naming and creation

Zoran Vasiljevic zv at archiware.com
Tue Nov 22 11:17:12 CET 2005


Hi!

What I need to do sometimes is to be able to cache
classes because their creation (in our case) might
be a costly operation.

For example:

    Class HeavyClass
    set hc [HeavyClass new]
    $hc whatevermethod

can be quite time consuming. What I'd like to do
is to "cache" "things" created by "new" or even
for:

   HeavyClass hc
   hc whatevermethod

What would be the best way to achieve this caching?

Thanks for help.
Zoran


More information about the Xotcl mailing list