Skip to content

Commit 0e3d83a

Browse files
committed
Cleanup LiveWindow callbacks on exit
1 parent ec7f385 commit 0e3d83a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

subprojects/robotpy-wpilib/gen/LiveWindow.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,11 @@ classes:
2222
IsEnabled:
2323
SetEnabled:
2424
UpdateValues:
25+
26+
inline_code: |
27+
static int unused;
28+
py::capsule cleanup(&unused, [](void *) {
29+
frc::LiveWindow::SetEnabledCallback(nullptr);
30+
frc::LiveWindow::SetDisabledCallback(nullptr);
31+
});
32+
m.add_object("_lw_cleanup", cleanup);

0 commit comments

Comments
 (0)