Prevent non-leak from showing up as a leak by scoping in a block. r=pinkerton@netscape.com

This commit is contained in:
dbaron%fas.harvard.edu 2000-03-16 01:27:12 +00:00
Родитель c046415a7a
Коммит bc8524a534
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -906,9 +906,12 @@ int main(int argc, char* argv[])
// out of that proxy and properly onto the clipboard. This can't be done in the // out of that proxy and properly onto the clipboard. This can't be done in the
// clipboard service's shutdown routine because it requires the parser/etc which // clipboard service's shutdown routine because it requires the parser/etc which
// has already been shutdown by the time the clipboard is shut down. // has already been shutdown by the time the clipboard is shut down.
{
// scoping this in a block to force release
NS_WITH_SERVICE(nsIClipboard, clipService, "component://netscape/widget/clipboard", &rv); NS_WITH_SERVICE(nsIClipboard, clipService, "component://netscape/widget/clipboard", &rv);
if ( clipService ) if ( clipService )
clipService->ForceDataToClipboard(); clipService->ForceDataToClipboard();
}
rv = NS_ShutdownXPCOM( NULL ); rv = NS_ShutdownXPCOM( NULL );
NS_ASSERTION(NS_SUCCEEDED(rv), "NS_ShutdownXPCOM failed"); NS_ASSERTION(NS_SUCCEEDED(rv), "NS_ShutdownXPCOM failed");