From cf12826dc4a279dcc28835c5fb9d47392ac5c33e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Brooke?= Date: Tue, 28 Jan 2025 08:14:01 +0100 Subject: [PATCH] QArrayDataPointer: use Data::deallocate() instead of raw free() Be symmetrical with the Data::allocate() in the constructor. This is not strictly a no-op since we now call the exported symbol QArrayData::deallocate() instead of inlining a free() call. However, it allows future sized-free optimizations. Pick-to: 6.8 Change-Id: I2ef00a897f56a32a0f1188f69f159834e6ca5b64 Reviewed-by: Thiago Macieira (cherry picked from commit 41c47fdd192cafa001b6e67defc314af5c1d6316) --- src/corelib/tools/qarraydatapointer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qarraydatapointer.h b/src/corelib/tools/qarraydatapointer.h index 75ca2af3a0d..c7731748b20 100644 --- a/src/corelib/tools/qarraydatapointer.h +++ b/src/corelib/tools/qarraydatapointer.h @@ -107,7 +107,7 @@ public: { if (!deref()) { (*this)->destroyAll(); - free(d); + Data::deallocate(d); } }