This repository was archived by the owner on May 24, 2026. It is now read-only.
Commit 81532cb
Skip g_object_unref during process detach to prevent shutdown crash
.NET finalizers call MsiCloseHandle during process shutdown, after
GLib's type system may already be partially torn down. This causes
AccessViolationException when g_object_unref tries to access the
GObject vtable.
Add DllMain that sets a flag on DLL_PROCESS_DETACH. When set,
handle_table_close skips the g_object_unref - the OS will reclaim
all memory anyway.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent d156d3a commit 81532cb
1 file changed
Lines changed: 21 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
7 | 22 | | |
8 | 23 | | |
9 | 24 | | |
| |||
227 | 242 | | |
228 | 243 | | |
229 | 244 | | |
230 | | - | |
231 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
232 | 251 | | |
233 | 252 | | |
234 | 253 | | |
| |||
274 | 293 | | |
275 | 294 | | |
276 | 295 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | 296 | | |
285 | 297 | | |
286 | 298 | | |
| |||
291 | 303 | | |
292 | 304 | | |
293 | 305 | | |
294 | | - | |
295 | 306 | | |
0 commit comments