Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix memory leak of i3ipcCon #7

Merged
merged 1 commit into from
Mar 20, 2016

Conversation

cornerman
Copy link
Contributor

i3ipcCon is a tree and each node keeps a reference to its parent and
children. Because of the circular reference, the nodes in the tree were
never freed.

Therefore, make the child only hold a weak reference to its parent
instead of calling g_object_ref. Assure that the parent field is unset
whenever the parent of a separately referenced child is freed.

i3ipcCon is a tree and each node keeps a reference to its parent and
children. Because of the circular reference, the nodes in the tree were
never freed.

Therefore, make the child only hold a weak reference to its parent
instead of calling g_object_ref. Assure that the parent field is unset
whenever the parent of a separately referenced child is freed.
@acrisci
Copy link
Member

acrisci commented Jan 24, 2016

Thanks for working on this.

Just curious, are you using the tree in a project of yours? I would like to see how you are using it to see if your use case is completely covered.

@cornerman
Copy link
Contributor Author

Well, I use the tree reply in i3-easyfocus to collect the visible windows with their position (and decoration). Which use case are you interested in?

acrisci pushed a commit that referenced this pull request Mar 20, 2016
@acrisci acrisci merged commit 836d0a2 into altdesktop:master Mar 20, 2016
@cornerman cornerman deleted the fix_con_mem_leak branch March 22, 2016 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants