]> Untitled Git - bdk/commit
fix(core): Memory leak bugs in `CheckPoint::drop` impl
author志宇 <hello@evanlinjin.me>
Sat, 19 Jul 2025 06:45:32 +0000 (16:45 +1000)
committerLeonardo Lima <oleonardolima@users.noreply.github.com>
Fri, 17 Oct 2025 18:27:08 +0000 (13:27 -0500)
commit0bd93dad114b90c3f08df9cc892625e250edb718
tree00569a88bc72ade7d8971fdbad833bc91e216df9
parent13940d91f508938745fab507c224e717c6315c76
fix(core): Memory leak bugs in `CheckPoint::drop` impl

Fix memory leak bug in `CheckPoint::drop` by using `Arc::into_inner`.

Fix `CPInner::drop` logic so that if `CPInner::block` becomes
generic and is of a type that required `drop`, it does not leak memory.

Add tests for memory leak + stack overflow when dropping `CheckPoint`.
crates/core/src/checkpoint.rs