summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2026-01-04 17:25:38 +0100
committerJulian Andres Klode <jak@debian.org>2026-01-05 21:20:24 +0000
commit5bdd21f915d1af832e9d3b874ddbd3ba2a178a06 (patch)
tree2fc792b3f50933d0c1f3c8f69f8551c96a59e5ea /apt-pkg
parent62fa3858d12f163de7db81f6e2be770e39783238 (diff)
solver3: Ensure rule-of-3 memory safety for ContiguousCacheMap
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/solver3.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h
index 6fa00933f..4a2b4ac8d 100644
--- a/apt-pkg/solver3.h
+++ b/apt-pkg/solver3.h
@@ -59,6 +59,10 @@ class ContiguousCacheMap
V &operator[](const K *key) { return data_[key->ID]; }
const V &operator[](const K *key) const { return data_[key->ID]; }
~ContiguousCacheMap() { delete[] data_; }
+
+ // Delete copy constructors for memory safety (rule of 3)
+ ContiguousCacheMap(const ContiguousCacheMap &) = delete;
+ ContiguousCacheMap &operator=(const ContiguousCacheMap &) = delete;
};
/**