Skip to content

Commit

Permalink
Use proper allocator.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Kovalenko committed Oct 31, 2014
1 parent 42ede87 commit f60f1a0
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/editors/xrManagedApi/core/PostProcessAnimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ PostProcessParamBase::PostProcessParamBase(::CPostProcessParam* impl) { this->im
PostProcessParamBase::~PostProcessParamBase()
{
if (!dontDestroy)
delete impl;
{
auto p = impl;
xr_delete(p);
}
impl = nullptr;
}

Expand Down Expand Up @@ -92,7 +95,10 @@ PostProcessInfo::PostProcessInfo(::SPPInfo* impl, bool dontDestroy) : PostProces
PostProcessInfo::~PostProcessInfo()
{
if (!dontDestroy)
delete impl;
{
auto p = impl;
xr_delete(p);
}
impl = nullptr;
}
PostProcessInfo% PostProcessInfo::Add(const PostProcessInfo% ppi)
Expand Down Expand Up @@ -138,12 +144,14 @@ void PostProcessParamProxy::GetValue(float time, [Out] float% value, int index)
float PostProcessParamProxy::GetKeyTime(int index) { return impl->get_key_time(index); }
void PostProcessParamProxy::Reset() { impl->clear_all_keys(); }

BasicPostProcessAnimator::BasicPostProcessAnimator() : impl(new ::BasicPostProcessAnimator()) {}
BasicPostProcessAnimator::BasicPostProcessAnimator() : impl(xr_new<::BasicPostProcessAnimator>()) {}
BasicPostProcessAnimator::BasicPostProcessAnimator(int id, bool cyclic) :
impl(new ::BasicPostProcessAnimator(id, cyclic)) {}
impl(xr_new<::BasicPostProcessAnimator>(id, cyclic)) {}

BasicPostProcessAnimator::~BasicPostProcessAnimator()
{
delete impl;
auto p = impl;
xr_delete(p);
impl = nullptr;
}
void BasicPostProcessAnimator::Clear() { impl->Clear(); }
Expand Down

0 comments on commit f60f1a0

Please sign in to comment.