On Aug 18, 1:43 pm, Boris Zbarsky <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > // printListener inherited from nsiWebProgressListener > > printListener = new MyListener(); // can be anywhere in code > > This has a refcount of 0. > > > // somewhere else in code > > printing->Print(settings, printListener); > > This violates a fundamental rule about passing XPCOM objects to methods. > > I suggest reading the XPCOM documentation... > > -Boris
Not trying to violate any rules! :) I'm printing hundreds of pages through multiple windows, so I wanted only the minmium listeners. I instantiate them on window creation and store in extra window mem. Works fine , until the destructor is called. I now just addref after creation. Thanks, I forgot that part. And yes, it is the "only" raw pointer I use. I'm not that crazy. The whole reason I used the raw pointer is I did not see a way to add another weblistener to the browser with a print contract id for querying later. Maybe there is but did not see it. I have multiple enviornments and they all don't have intellisense hooked up. It just takes time, no matter how much doc(good or bad) one reads on Mozilla. _______________________________________________ dev-embedding mailing list dev-embedding@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-embedding