> > > > 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.
> 
> where is the reference to it?  After seeing the initial email I looked
> through what I think is the right bit of code, and it seems to make
> perfect sense that it was garbage collected.  For my use I think I'll be
> patching it (and post it if ppl want) unless someone can proove that the
> initial email was not correct.

Well in my code, the iterator i wrote kept a reference to the underlying result
set.

-- 
[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