Skip to content

Conversation

@sonnyp
Copy link
Contributor

@sonnyp sonnyp commented Nov 26, 2022

No description provided.

Comment on lines 80 to 84
// FIXME: working for Internal but not here
// the list of root objects keeps growing in Inspector as you make changes to UI
// Toplevel windows returned by these functions will stay around until the user explicitly destroys them with gtk_window_destroy().
// https://docs.gtk.org/gtk4/class.Builder.html
target.destroy();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lw64 could you look into why this doesn't work on the external previewer and global objects keep accumulating when making changes ?

How to reproduce:

  1. Select the Application window example
  2. Selecting Vala
  3. Entering the following code:
#!/usr/bin/env -S vala workbench.vala --pkg gtk4 --pkg libadwaita-1
public void main() {}
  1. Hit Run
  2. Open the GTK Inspector on the preview window/process
  3. Make changes to UI
  4. Observe the list of global objects grow for each change

Screenshot from 2022-11-25 18-38-14

@sonnyp sonnyp force-pushed the destroy-toplevel-objects branch from 7f1a687 to 4df25b7 Compare November 26, 2022 13:38
@sonnyp sonnyp marked this pull request as ready for review December 18, 2022 22:24
@sonnyp sonnyp merged commit 62c513c into main Dec 18, 2022
@sonnyp sonnyp deleted the destroy-toplevel-objects branch December 18, 2022 22:39
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.

3 participants