Skip to content

Commit f60f1a0

Browse files
author
Pavel Kovalenko
committed
Use proper allocator.
1 parent 42ede87 commit f60f1a0

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/editors/xrManagedApi/core/PostProcessAnimator.cpp

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ PostProcessParamBase::PostProcessParamBase(::CPostProcessParam* impl) { this->im
2020
PostProcessParamBase::~PostProcessParamBase()
2121
{
2222
if (!dontDestroy)
23-
delete impl;
23+
{
24+
auto p = impl;
25+
xr_delete(p);
26+
}
2427
impl = nullptr;
2528
}
2629

@@ -92,7 +95,10 @@ PostProcessInfo::PostProcessInfo(::SPPInfo* impl, bool dontDestroy) : PostProces
9295
PostProcessInfo::~PostProcessInfo()
9396
{
9497
if (!dontDestroy)
95-
delete impl;
98+
{
99+
auto p = impl;
100+
xr_delete(p);
101+
}
96102
impl = nullptr;
97103
}
98104
PostProcessInfo% PostProcessInfo::Add(const PostProcessInfo% ppi)
@@ -138,12 +144,14 @@ void PostProcessParamProxy::GetValue(float time, [Out] float% value, int index)
138144
float PostProcessParamProxy::GetKeyTime(int index) { return impl->get_key_time(index); }
139145
void PostProcessParamProxy::Reset() { impl->clear_all_keys(); }
140146

141-
BasicPostProcessAnimator::BasicPostProcessAnimator() : impl(new ::BasicPostProcessAnimator()) {}
147+
BasicPostProcessAnimator::BasicPostProcessAnimator() : impl(xr_new<::BasicPostProcessAnimator>()) {}
142148
BasicPostProcessAnimator::BasicPostProcessAnimator(int id, bool cyclic) :
143-
impl(new ::BasicPostProcessAnimator(id, cyclic)) {}
149+
impl(xr_new<::BasicPostProcessAnimator>(id, cyclic)) {}
150+
144151
BasicPostProcessAnimator::~BasicPostProcessAnimator()
145152
{
146-
delete impl;
153+
auto p = impl;
154+
xr_delete(p);
147155
impl = nullptr;
148156
}
149157
void BasicPostProcessAnimator::Clear() { impl->Clear(); }

0 commit comments

Comments
 (0)