all: fix memory leaks
This commit is contained in:
parent
e212e0b8b1
commit
9904717c71
18 changed files with 149 additions and 10 deletions
|
|
@ -32,6 +32,10 @@ impl DisplayNode {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn clear(&self) {
|
||||
self.outputs.clear();
|
||||
}
|
||||
|
||||
pub fn update_extents(&self) {
|
||||
let outputs = self.outputs.lock();
|
||||
let mut x1 = i32::MAX;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,15 @@ pub struct OutputNode {
|
|||
}
|
||||
|
||||
impl OutputNode {
|
||||
pub fn clear(&self) {
|
||||
self.global.clear();
|
||||
self.workspace.set(None);
|
||||
let workspaces: Vec<_> = self.workspaces.iter().collect();
|
||||
for workspace in workspaces {
|
||||
workspace.clear();
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update_render_data(&self) {
|
||||
let mut rd = self.render_data.borrow_mut();
|
||||
rd.titles.clear();
|
||||
|
|
|
|||
|
|
@ -33,6 +33,12 @@ pub struct WorkspaceNode {
|
|||
}
|
||||
|
||||
impl WorkspaceNode {
|
||||
pub fn clear(&self) {
|
||||
self.container.set(None);
|
||||
self.output_link.set(None);
|
||||
self.fullscreen.set(None);
|
||||
}
|
||||
|
||||
pub fn set_container(self: &Rc<Self>, container: &Rc<ContainerNode>) {
|
||||
let pos = self.position.get();
|
||||
container.clone().tl_change_extents(&pos);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue