Hold a WeakViewHandle in BufferElement
Otherwise, the element never goes away because the view never goes away because the element is holding a strong reference. Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
co-authored by
Max Brunsfeld
parent
7717700b2c
commit
008f2b905b
@@ -2161,8 +2161,8 @@ impl Entity for BufferView {
|
||||
}
|
||||
|
||||
impl View for BufferView {
|
||||
fn render<'a>(&self, app: &AppContext) -> ElementBox {
|
||||
BufferElement::new(self.handle.upgrade(app).unwrap()).boxed()
|
||||
fn render<'a>(&self, _: &AppContext) -> ElementBox {
|
||||
BufferElement::new(self.handle.clone()).boxed()
|
||||
}
|
||||
|
||||
fn ui_name() -> &'static str {
|
||||
|
||||
Reference in New Issue
Block a user