1
0
Fork 0

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:
ehofman 2006-01-24 14:45:13 +00:00
parent 907b99a669
commit 0895721e68
2 changed files with 6 additions and 10 deletions

View file

@ -25,18 +25,12 @@
// constructor
FGBeacon::FGBeacon() :
inner(NULL),
middle(NULL),
outer(NULL)
FGBeacon::FGBeacon()
{
}
// destructor
FGBeacon::~FGBeacon() {
delete inner;
delete middle;
delete outer;
}

View file

@ -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: