mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 02:48:12 +08:00
Add cache clearing to stop the memory leak (#1106)
* Add cache clearing * Add TODO comment --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -34,7 +34,12 @@ where
|
||||
Box::new(self.node.eval(*input))
|
||||
}
|
||||
}
|
||||
fn reset(self: std::pin::Pin<&mut Self>) {
|
||||
let wrapped_node = unsafe { self.map_unchecked_mut(|e| &mut e.node) };
|
||||
Node::reset(wrapped_node);
|
||||
}
|
||||
}
|
||||
|
||||
impl<_I, _O, S0> DynAnyRefNode<_I, _O, S0> {
|
||||
pub const fn new(node: S0) -> Self {
|
||||
Self { node, _i: core::marker::PhantomData }
|
||||
|
||||
Reference in New Issue
Block a user