Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Mueller <nexyon@gmail.com>2011-06-04 03:28:57 +0400
committerJoerg Mueller <nexyon@gmail.com>2011-06-04 03:28:57 +0400
commitd1c542ce0551f6ec3408b7c6689ad17b0a14e8d2 (patch)
tree4d4ca1da42cee6db71b3515f7330aa0fffdb6d70 /intern/audaspace/FX/AUD_DoubleFactory.cpp
parentcd04cff1800e8f60a06d8da6e79ac436808c9a7d (diff)
3D Audio GSoC:
Memory management improvements.
Diffstat (limited to 'intern/audaspace/FX/AUD_DoubleFactory.cpp')
-rw-r--r--intern/audaspace/FX/AUD_DoubleFactory.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/intern/audaspace/FX/AUD_DoubleFactory.cpp b/intern/audaspace/FX/AUD_DoubleFactory.cpp
index 7a40f1f8c96..5b72082f520 100644
--- a/intern/audaspace/FX/AUD_DoubleFactory.cpp
+++ b/intern/audaspace/FX/AUD_DoubleFactory.cpp
@@ -32,25 +32,15 @@
#include "AUD_DoubleFactory.h"
#include "AUD_DoubleReader.h"
-AUD_DoubleFactory::AUD_DoubleFactory(AUD_IFactory* factory1, AUD_IFactory* factory2) :
+AUD_DoubleFactory::AUD_DoubleFactory(AUD_Reference<AUD_IFactory> factory1, AUD_Reference<AUD_IFactory> factory2) :
m_factory1(factory1), m_factory2(factory2)
{
}
-AUD_IReader* AUD_DoubleFactory::createReader() const
+AUD_Reference<AUD_IReader> AUD_DoubleFactory::createReader() const
{
- AUD_IReader* reader1 = m_factory1->createReader();
- AUD_IReader* reader2;
-
- try
- {
- reader2 = m_factory2->createReader();
- }
- catch(AUD_Exception&)
- {
- delete reader1;
- throw;
- }
+ AUD_Reference<AUD_IReader> reader1 = m_factory1->createReader();
+ AUD_Reference<AUD_IReader> reader2 = m_factory2->createReader();
return new AUD_DoubleReader(reader1, reader2);
}