Bug 1047759: Clear FMRadioService's StaticRefPtr so it is not leaked at shutdown. r=khuey

This commit is contained in:
Pin Zhang 2014-08-04 20:04:00 -07:00
parent 5987fa8bbc
commit 3fd9054476

View File

@ -6,6 +6,7 @@
#include "FMRadioService.h"
#include "mozilla/Hal.h"
#include "mozilla/ClearOnShutdown.h"
#include "nsIAudioManager.h"
#include "AudioManager.h"
#include "nsDOMClassInfo.h"
@ -832,6 +833,7 @@ FMRadioService::Singleton()
if (!sFMRadioService) {
sFMRadioService = new FMRadioService();
ClearOnShutdown(&sFMRadioService);
}
return sFMRadioService;