Mathias Frhlich:
Incorporating the shared ptr code: - All scenegraph references from SimGear - SGMaterial which already had a reference counter uses now that common infrastructure. - SGMatModel is now counted. - SGSoundSample from SimGear - And the corresponding change for the sound samples in flightgear which fixes a latent crash if FGBeacon would evern be deleted.
This commit is contained in:
parent
907b99a669
commit
0895721e68
2 changed files with 6 additions and 10 deletions
|
@ -25,18 +25,12 @@
|
|||
|
||||
|
||||
// constructor
|
||||
FGBeacon::FGBeacon() :
|
||||
inner(NULL),
|
||||
middle(NULL),
|
||||
outer(NULL)
|
||||
FGBeacon::FGBeacon()
|
||||
{
|
||||
}
|
||||
|
||||
// destructor
|
||||
FGBeacon::~FGBeacon() {
|
||||
delete inner;
|
||||
delete middle;
|
||||
delete outer;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
#include <simgear/compiler.h>
|
||||
#include <simgear/sound/soundmgr_openal.hxx>
|
||||
#include <simgear/structure/SGReferenced.hxx>
|
||||
#include <simgear/structure/SGSharedPtr.hxx>
|
||||
|
||||
#include "morse.hxx"
|
||||
|
||||
|
@ -93,9 +95,9 @@ class FGBeacon {
|
|||
|
||||
private:
|
||||
|
||||
SGSoundSample *inner;
|
||||
SGSoundSample *middle;
|
||||
SGSoundSample *outer;
|
||||
SGSharedPtr<SGSoundSample> inner;
|
||||
SGSharedPtr<SGSoundSample> middle;
|
||||
SGSharedPtr<SGSoundSample> outer;
|
||||
|
||||
public:
|
||||
|
||||
|
|
Loading…
Reference in a new issue