From bc8524a5342351607b45607589df32db64c52152 Mon Sep 17 00:00:00 2001 From: "dbaron%fas.harvard.edu" Date: Thu, 16 Mar 2000 01:27:12 +0000 Subject: [PATCH] Prevent non-leak from showing up as a leak by scoping in a block. r=pinkerton@netscape.com --- xpfe/bootstrap/nsAppRunner.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xpfe/bootstrap/nsAppRunner.cpp b/xpfe/bootstrap/nsAppRunner.cpp index 591587563aeb..18d98a62b6e7 100644 --- a/xpfe/bootstrap/nsAppRunner.cpp +++ b/xpfe/bootstrap/nsAppRunner.cpp @@ -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 // clipboard service's shutdown routine because it requires the parser/etc which // 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); if ( clipService ) clipService->ForceDataToClipboard(); + } rv = NS_ShutdownXPCOM( NULL ); NS_ASSERTION(NS_SUCCEEDED(rv), "NS_ShutdownXPCOM failed");