Everytime I create an nsCOMPtr pointer to the nsIServiceManager
interface I get a "Component Manager being held past XPCOM shutdown"
ASSERTION message.  This only happens with the service manager
interface.  I've tried several different ways of getting a pointer to
the service manager using nsCOMPtr and they always result in the
ASSERTION message.  This only happens when using the nsCOMPtr pointer
and not a regular pointer.  I've included a simple program which
reproduces the result for me.  Could someone confirm that this is an
actual bug and not something that I'm doing wrong?

Thanks in advance.

Brian A. Hunter
EE Student
University of Illinois at Urbana-Champaign
[EMAIL PROTECTED]
--------------------------------------------------------------------
#include <nsXPCOMGlue.h>
#include <nsXPCOM.h>
#include <nsCOMPtr.h>
#include <nsIServiceManager.h>

int main()
{
  GRE_Startup();

  nsCOMPtr<nsIServiceManager> servman;
  NS_GetServiceManager(getter_AddRefs(servman));
  servman = nsnull;

GRE_Shutdown();

  return 0;
}




Reply via email to