On 7/24/07, Matt Benson <[EMAIL PROTECTED]> wrote:
--- Dominique Devienne <[EMAIL PROTECTED]> wrote: Certainly this could be done, but I was looking to avoid the expense of multiple reflection-based checks. Do you think it would be better to store a Boolean so that the call could still be made only once (triggered by the null reference), but deferred until after initialization?
Well, I think Java does provide you with virtual dispatch in this case, unlike C++ (the vtable hasn't been setup yet properly), but as I said, calling a derived virtual method from a base class is best avoided. Adding the preserveBC member isn't exactly great in the first place, so adding another to know if the first was initialized is so so. Yet I don't see a way around it... --DD --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]