Skip to content

Commit dd2b1d2

Browse files
committed
book: Extend memory management chapter
1 parent f5ef5ef commit dd2b1d2

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

book/src/g_object_memory_management.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,19 @@ fn build_ui(application: &Application) {
2929
.margin_start(12)
3030
.margin_end(12)
3131
.build();
32-
let button_decrease = Button::builder()
33-
.label("Decrease")
34-
.margin_top(12)
35-
.margin_bottom(12)
36-
.margin_start(12)
37-
.margin_end(12)
38-
.build();
3932

4033
// A mutable integer
4134
let mut number = 0;
4235

4336
// Connect callbacks
4437
// When a button is clicked, `number` should be changed
4538
button_increase.connect_clicked(|_| number += 1);
46-
button_decrease.connect_clicked(|_| number -= 1);
4739

4840
// Add buttons to `gtk_box`
4941
let gtk_box = gtk::Box::builder()
5042
.orientation(Orientation::Vertical)
5143
.build();
5244
gtk_box.append(&button_increase);
53-
gtk_box.append(&button_decrease);
5445

5546
// Create a window
5647
let window = ApplicationWindow::builder()

0 commit comments

Comments
 (0)