part of mailnews audit --> use nsCOMPtr.

This commit is contained in:
mscott%netscape.com 1999-05-04 20:34:31 +00:00
Родитель 9fd7908941
Коммит d7bce8632c
2 изменённых файлов: 3 добавлений и 11 удалений

Просмотреть файл

@ -78,21 +78,16 @@ nsSmtpUrl::nsSmtpUrl(nsISupports* aContainer, nsIURLGroup* aGroup) :
m_search = nsnull;
m_errorMessage = nsnull;
m_runningUrl = PR_FALSE;
nsServiceManager::GetService(kUrlListenerManagerCID, nsIUrlListenerManager::GetIID(),
(nsISupports **)&m_urlListeners);
nsComponentManager::CreateInstance(kUrlListenerManagerCID, nsnull, nsIUrlListenerManager::GetIID(), (void **) getter_AddRefs(m_urlListeners));
m_container = aContainer;
NS_IF_ADDREF(m_container);
// ParseURL(aSpec, aURL); // XXX whh
}
nsSmtpUrl::~nsSmtpUrl()
{
CleanupSmtpState();
NS_IF_RELEASE(m_urlListeners);
NS_IF_RELEASE(m_container);
PR_FREEIF(m_errorMessage);
@ -105,10 +100,6 @@ nsSmtpUrl::~nsSmtpUrl()
PR_FREEIF(m_file);
PR_FREEIF(m_ref);
PR_FREEIF(m_search);
if (nsnull != m_URL_s)
{
// NET_DropURLStruct(m_URL_s);
}
}
NS_IMPL_THREADSAFE_ADDREF(nsSmtpUrl);

Просмотреть файл

@ -20,6 +20,7 @@
#define nsSmtpUrl_h__
#include "nsISmtpUrl.h"
#include "nsCOMPtr.h"
#include "nsINetlibURL.h" /* this should be temporary until Network N2 project lands */
#include "nsIUrlListenerManager.h"
@ -160,7 +161,7 @@ protected:
nsISupports* m_container;
// manager of all of current url listeners....
nsIUrlListenerManager * m_urlListeners;
nsCOMPtr<nsIUrlListenerManager> m_urlListeners;
/* Smtp specific event sinks */
nsString m_userPassword;