From: Michal H. <ms...@gm...> - 2009-08-11 12:19:35
|
On Tue, Aug 11, 2009 at 09:36:10AM +0000, Jozef Misutka wrote: > > michal, > > after your changes kernel cannot be used. > > boost::shared_ptr pdf = ip.getPdf ().lock (); > boost::shared_ptr< ::Object> obj(new ::Object(), xpdf::object_deleter()); > > int len = array.arrayGetLength (); > for (int i = 0; i < len; ++i) > { > ... > if (cobj) > { > // Store it in the storage > resultArray.push_back (cobj); > // Free resources allocated by the object > obj.reset (); <---------------------------------- I assume that you mean xpdfArrayReader::operator(), right? At least file name would help... There are, however other places which use reset. I got confused, because there were explicit o->free() calls somewhere and I missed that you have used XpdfObject.reset() as well. See the attached patch. Btw. this could have been caught during review, couldn' it? Let me know whether I have caught all places. I have grep-ed through all files kernel files but there are many calls regarding streams so I might have missed something. > > obj.reset() has different semantics than in XpdfObject! please fix it asap! Of course it has! I was just kicked by this when I was testing other my local changes. This seems to fix them - at least for delinearizator code paths. > > /jozo > > _________________________________________________________________ > Get back to school stuff for them and cashback for you. > http://www.bing.com/cashback?form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1 -- Michal Hocko |