diff options
author | David Robillard <d@drobilla.net> | 2017-02-12 15:04:20 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-02-12 15:31:47 +0100 |
commit | b1198f0842e6e4d6b1c01f07d91b42ef4a212788 (patch) | |
tree | 93fdf4da89a6f5f634707fb8c989e0d9ee1a3c65 /ingen | |
parent | 81d45973412c675e3c0b4a10b64d811a219feeae (diff) | |
download | ingen-b1198f0842e6e4d6b1c01f07d91b42ef4a212788.tar.gz ingen-b1198f0842e6e4d6b1c01f07d91b42ef4a212788.tar.bz2 ingen-b1198f0842e6e4d6b1c01f07d91b42ef4a212788.zip |
Use smart pointers to handle real-time memory disposal
Diffstat (limited to 'ingen')
-rw-r--r-- | ingen/types.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ingen/types.hpp b/ingen/types.hpp index e6cbc3b5..d1055e22 100644 --- a/ingen/types.hpp +++ b/ingen/types.hpp @@ -19,6 +19,8 @@ #include <memory> +#include "raul/Maid.hpp" + namespace Ingen { #if __cplusplus >= 201103L @@ -27,9 +29,13 @@ using SPtr = std::shared_ptr<T>; template <class T> using WPtr = std::weak_ptr<T>; + +template <class T> +using MPtr = Raul::managed_ptr<T>; #else #define SPtr std::shared_ptr #define WPtr std::weak_ptr +#define MPtr Raul::managed_ptr #endif template <class T> |