diff options
author | Joerg Mueller <nexyon@gmail.com> | 2011-06-04 03:28:57 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2011-06-04 03:28:57 +0400 |
commit | d1c542ce0551f6ec3408b7c6689ad17b0a14e8d2 (patch) | |
tree | 4d4ca1da42cee6db71b3515f7330aa0fffdb6d70 /intern/audaspace/FX/AUD_PingPongFactory.cpp | |
parent | cd04cff1800e8f60a06d8da6e79ac436808c9a7d (diff) |
3D Audio GSoC:
Memory management improvements.
Diffstat (limited to 'intern/audaspace/FX/AUD_PingPongFactory.cpp')
-rw-r--r-- | intern/audaspace/FX/AUD_PingPongFactory.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/intern/audaspace/FX/AUD_PingPongFactory.cpp b/intern/audaspace/FX/AUD_PingPongFactory.cpp index fa140555943..4f0d2a207ac 100644 --- a/intern/audaspace/FX/AUD_PingPongFactory.cpp +++ b/intern/audaspace/FX/AUD_PingPongFactory.cpp @@ -33,26 +33,16 @@ #include "AUD_DoubleReader.h" #include "AUD_ReverseFactory.h" -AUD_PingPongFactory::AUD_PingPongFactory(AUD_IFactory* factory) : +AUD_PingPongFactory::AUD_PingPongFactory(AUD_Reference<AUD_IFactory> factory) : AUD_EffectFactory(factory) { } -AUD_IReader* AUD_PingPongFactory::createReader() const +AUD_Reference<AUD_IReader> AUD_PingPongFactory::createReader() const { - AUD_IReader* reader = getReader(); - AUD_IReader* reader2; + AUD_Reference<AUD_IReader> reader = getReader(); AUD_ReverseFactory factory(m_factory); - - try - { - reader2 = factory.createReader(); - } - catch(AUD_Exception&) - { - delete reader; - throw; - } + AUD_Reference<AUD_IReader> reader2 = factory.createReader(); return new AUD_DoubleReader(reader, reader2); } |