[Box Backup-commit] COMMIT r1031 - box/chris/merge/bin/bbackupd

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sat Oct 14 15:52:49 BST 2006


Author: chris
Date: 2006-10-14 15:52:49 +0100 (Sat, 14 Oct 2006)
New Revision: 1031

Modified:
   box/chris/merge/bin/bbackupd/Win32BackupService.cpp
Log:
 * Replace global daemon object with a pointer, to allow deletion and
   clean up reported memory leaks (refs #3, combine with [1027])


Modified: box/chris/merge/bin/bbackupd/Win32BackupService.cpp
===================================================================
--- box/chris/merge/bin/bbackupd/Win32BackupService.cpp	2006-10-14 14:50:33 UTC (rev 1030)
+++ box/chris/merge/bin/bbackupd/Win32BackupService.cpp	2006-10-14 14:52:49 UTC (rev 1031)
@@ -12,19 +12,19 @@
 
 #include "Win32BackupService.h"
 
-Win32BackupService gDaemonService;
+Win32BackupService* gpDaemonService = NULL;
 extern HANDLE gStopServiceEvent;
 
 unsigned int WINAPI RunService(LPVOID lpParameter)
 {
-	DWORD retVal = gDaemonService.WinService((const char*) lpParameter);
+	DWORD retVal = gpDaemonService->WinService((const char*) lpParameter);
 	SetEvent(gStopServiceEvent);
 	return retVal;
 }
 
 void TerminateService(void)
 {
-	gDaemonService.SetTerminateWanted();
+	gpDaemonService->SetTerminateWanted();
 }
 
 DWORD Win32BackupService::WinService(const char* pConfigFileName)




More information about the Boxbackup-commit mailing list