Commit 6e071b5
committed
fix(devins-lang): fix memory leak in DevInsProgramRunner
Problem:
DevInsProgramRunner was implementing Disposable and registering a
MessageBusConnection with 'this' as parent, but the runner itself
was never properly disposed, causing memory leak warnings.
Solution:
- Remove Disposable interface from DevInsProgramRunner
- Connect to project's message bus instead of application's
- Register the connection with the project as parent disposable
- This ensures proper cleanup when the project is closed
The connection is now tied to the project lifecycle instead of
the runner's lifecycle, which is the correct pattern for
ProgramRunner implementations.1 parent 4f86ef1 commit 6e071b5
File tree
1 file changed
+15
-10
lines changed- exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/run
1 file changed
+15
-10
lines changedLines changed: 15 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
| |||
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 79 | | |
0 commit comments