I dunno exactly what could be the problem. But can you get a stack trace ? Someone more knowledgeable will be able to assist you faster. Also single stepping into the *_retval = bObj; and seeing what happened to the refcnt might help.
gangadhar Tomasz Motyl wrote:
welcome i do have a question.. possibly simple :) i've a class: nsIaClass { nsCOMPtr<nsIbClass> bObj; public: virtual nsresult GetbObj(nsIbClass **_retval) = 0; };
then its implementation: nsresult nsbClass::GetbObj(nsIbClass **_retval) { *_retval = bObj; //i'm sure of that bObj hath been initialised by do_CreateInstance(..) and isn't nsnull NS_IF_ADDREF(*_retval); return NS_OK; }
my question is about proper assignment of nsCOMPtr to *_retval pointer, because of xpcom sigsegv'ing :/ it hath worked before but maybe it's wrong approach to the nsCOMPtr stuff.. i'd be very greatful for any verification.. i do hope i've just misunderstood the nsCOMPtr manual
kindest regards
_______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
