From 39ce835b1bef1ae4d1d1cab96f1e362e3466bbc5 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Mon, 2 Feb 2026 21:55:34 -0500 Subject: [PATCH] xo-interpreter2: scaffold repl + alloc measurement frameowkr --- include/xo/facet/box.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/xo/facet/box.hpp b/include/xo/facet/box.hpp index 54e724e..62f797e 100644 --- a/include/xo/facet/box.hpp +++ b/include/xo/facet/box.hpp @@ -38,6 +38,7 @@ namespace xo { {} /** (copy ctor not supported -- ownership is unique) **/ + box(const box & other) = delete; // -------------------------------- @@ -73,8 +74,10 @@ namespace xo { ~box() { auto p = this->data(); - this->_drop(); - ::operator delete(p); + if (p) { + this->_drop(); + ::operator delete(p); + } } }; } /*namespace facet*/