doc(miniscript): Remove mention of shared pointers

Correct destructor implementation comment to no longer refer to shared pointers and also move it into the function body, in symmetry with Clone() right below.

Leftover from #30866.
This commit is contained in:
Hodlinator 2025-01-22 21:19:24 +01:00
parent f7e88e298a
commit 22e4115312
No known key found for this signature in database

View File

@ -532,9 +532,11 @@ struct Node {
//! The Script context for this node. Either P2WSH or Tapscript.
const MiniscriptContext m_script_ctx;
/* Destroy the shared pointers iteratively to avoid a stack-overflow due to recursive calls
* to the subs' destructors. */
~Node() {
~Node()
{
// Destroy the subexpressions iteratively after moving out their
// subexpressions to avoid a stack-overflow due to recursive calls to
// the subs' destructors.
while (!subs.empty()) {
auto node = std::move(subs.back());
subs.pop_back();