Alexander Dyagilev wrote:
  ClassA* pA = new ClassA;
  pA->somefunc (parameters...);
  pA->AddRef ();
  *_retval = pA;

Yeah, this works. It would be better though to call AddRef before calling somefunc, in case somefun ends up addrefing+releasing pA, which would be bad if the refcount is zero.
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to