diff --git a/src/Sound/beacon.cxx b/src/Sound/beacon.cxx index ddc8750b0..5d9ae9594 100644 --- a/src/Sound/beacon.cxx +++ b/src/Sound/beacon.cxx @@ -25,18 +25,12 @@ // constructor -FGBeacon::FGBeacon() : - inner(NULL), - middle(NULL), - outer(NULL) +FGBeacon::FGBeacon() { } // destructor FGBeacon::~FGBeacon() { - delete inner; - delete middle; - delete outer; } diff --git a/src/Sound/beacon.hxx b/src/Sound/beacon.hxx index 6c7021420..1c2fcd4b6 100644 --- a/src/Sound/beacon.hxx +++ b/src/Sound/beacon.hxx @@ -32,6 +32,8 @@ #include #include +#include +#include #include "morse.hxx" @@ -93,9 +95,9 @@ class FGBeacon { private: - SGSoundSample *inner; - SGSoundSample *middle; - SGSoundSample *outer; + SGSharedPtr inner; + SGSharedPtr middle; + SGSharedPtr outer; public: