> > The problem with this code is that after the call to getResults(), the
> > OQLQuery instance goes out of scope - hence it is marked for garbage
> > collection.
> 
> this is strange. Are you sure this is the reason? Java objects are
> allocated on the heap so it doesn't matter if it goes out of scope or not
> as long as there is a reference to it. The garbage collector will not
> deallocate an object that has a reference to it.

I had the same problem when i wrote an Iterator to sit on top, and came to
the conclusion that it was going out of scope some how... but i came to the
same conclusion that you made, there was still a reference to it so it shouldnt
be destroyed..  I think its because a subsequent querie may re-use some resouce
that the first query was using.. im not sure.

My ResultSetIterator worked ok, sorta, if you only wanted the first result,
then would be considered empty.  Very strange.

-- 
[EMAIL PROTECTED]     Do not meddle in the affairs of dragons, because you are
                crunchy and taste good with ketchup.

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to