[DEV] update to the new ETK allocator wrapper

This commit is contained in:
Edouard DUPIN 2017-10-21 19:05:21 +02:00
parent 38c9a69e1e
commit be4f6217d0
9 changed files with 9 additions and 9 deletions

View File

@ -96,7 +96,7 @@ ememory::SharedPtr<audio::river::Interface> audio::river::Interface::create(floa
audio::format _format,
const ememory::SharedPtr<audio::river::io::Node>& _node,
const ejson::Object& _config) {
ememory::SharedPtr<audio::river::Interface> out = ememory::SharedPtr<audio::river::Interface>(new audio::river::Interface());
ememory::SharedPtr<audio::river::Interface> out = ememory::SharedPtr<audio::river::Interface>(ETK_NEW(audio::river::Interface()));
out->init(_freq, _map, _format, _node, _config);
return out;
}

View File

@ -26,7 +26,7 @@ ememory::SharedPtr<audio::river::Manager> audio::river::Manager::create(const et
}
}
// create a new one:
ememory::SharedPtr<audio::river::Manager> out = ememory::SharedPtr<audio::river::Manager>(new audio::river::Manager(_applicationUniqueId));
ememory::SharedPtr<audio::river::Manager> out = ememory::SharedPtr<audio::river::Manager>(ETK_NEW(audio::river::Manager(_applicationUniqueId)));
// add it at the list:
for (size_t iii=0; iii<g_listOfAllManager.size() ; ++iii) {
if (g_listOfAllManager[iii].expired() == true) {

View File

@ -105,7 +105,7 @@ ememory::SharedPtr<audio::river::io::Manager> audio::river::io::Manager::getInst
if (audio::river::isInit() == false) {
return ememory::SharedPtr<audio::river::io::Manager>();
}
static ememory::SharedPtr<audio::river::io::Manager> manager(new Manager());
static ememory::SharedPtr<audio::river::io::Manager> manager(ETK_NEW(Manager));
return manager;
}

View File

@ -11,7 +11,7 @@
#include <etk/Function.hpp>
ememory::SharedPtr<audio::river::io::NodeAEC> audio::river::io::NodeAEC::create(const etk::String& _name, const ejson::Object& _config) {
return ememory::SharedPtr<audio::river::io::NodeAEC>(new audio::river::io::NodeAEC(_name, _config));
return ememory::SharedPtr<audio::river::io::NodeAEC>(ETK_NEW(audio::river::io::NodeAEC, _name, _config));
}
ememory::SharedPtr<audio::river::Interface> audio::river::io::NodeAEC::createInput(float _freq,

View File

@ -35,7 +35,7 @@ int32_t audio::river::io::NodeFile::playbackCallback(void* _outputBuffer,
ememory::SharedPtr<audio::river::io::NodeFile> audio::river::io::NodeFile::create(const etk::String& _name, const ejson::Object& _config) {
return ememory::SharedPtr<audio::river::io::NodeFile>(new audio::river::io::NodeFile(_name, _config));
return ememory::SharedPtr<audio::river::io::NodeFile>(ETK_NEW(audio::river::io::NodeFile, _name, _config));
}
audio::river::io::NodeFile::NodeFile(const etk::String& _name, const ejson::Object& _config) :

View File

@ -11,7 +11,7 @@
#include <etk/Function.hpp>
ememory::SharedPtr<audio::river::io::NodeMuxer> audio::river::io::NodeMuxer::create(const etk::String& _name, const ejson::Object& _config) {
return ememory::SharedPtr<audio::river::io::NodeMuxer>(new audio::river::io::NodeMuxer(_name, _config));
return ememory::SharedPtr<audio::river::io::NodeMuxer>(ETK_NEW(audio::river::io::NodeMuxer, _name, _config));
}
ememory::SharedPtr<audio::river::Interface> audio::river::io::NodeMuxer::createInput(float _freq,

View File

@ -35,7 +35,7 @@ int32_t audio::river::io::NodeOrchestra::playbackCallback(void* _outputBuffer,
ememory::SharedPtr<audio::river::io::NodeOrchestra> audio::river::io::NodeOrchestra::create(const etk::String& _name, const ejson::Object& _config) {
return ememory::SharedPtr<audio::river::io::NodeOrchestra>(new audio::river::io::NodeOrchestra(_name, _config));
return ememory::SharedPtr<audio::river::io::NodeOrchestra>(ETK_NEW(audio::river::io::NodeOrchestra, _name, _config));
}
audio::river::io::NodeOrchestra::NodeOrchestra(const etk::String& _name, const ejson::Object& _config) :

View File

@ -54,7 +54,7 @@ int32_t audio::river::io::NodePortAudio::duplexCallback(const void* _inputBuffer
ememory::SharedPtr<audio::river::io::NodePortAudio> audio::river::io::NodePortAudio::create(const etk::String& _name, const ejson::Object& _config) {
return ememory::SharedPtr<audio::river::io::NodePortAudio>(new audio::river::io::NodePortAudio(_name, _config));
return ememory::SharedPtr<audio::river::io::NodePortAudio>(ETK_NEW(audio::river::io::NodePortAudio,_name, _config));
}
audio::river::io::NodePortAudio::NodePortAudio(const etk::String& _name, const ejson::Object& _config) :

View File

@ -67,5 +67,5 @@ class MainApplication : public ewol::context::Application {
*/
int main(int _argc, const char *_argv[]) {
// second possibility
return ewol::run(new MainApplication(), _argc, _argv);
return ewol::run(ETK_NEW(MainApplication), _argc, _argv);
}