mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Fix memory leak in the C++ SharedVector
detaching in the destructor is not a good idea, make sure to use the const version
This commit is contained in:
parent
cba553b9f7
commit
d9637816bb
1 changed files with 1 additions and 1 deletions
|
@ -175,7 +175,7 @@ private:
|
|||
void drop()
|
||||
{
|
||||
if (inner->refcount > 0 && (--inner->refcount) == 0) {
|
||||
auto b = begin(), e = end();
|
||||
auto b = cbegin(), e = cend();
|
||||
for (auto it = b; it < e; ++it) {
|
||||
it->~T();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue