fix(interop): resolve native resource leaks in GTK and WebKit interop
All checks were successful
CI / Build (Linux) (push) Successful in 21s
All checks were successful
CI / Build (Linux) (push) Successful in 21s
Fix critical memory leaks identified in architecture review: Add signal handler disconnection in WebKitNative (load-changed and script-dialog signals now properly cleaned up), implement GTK idle callback cleanup with automatic removal on completion, add dlclose() calls for WebKit library handles, track GTK signal IDs in GtkSkiaSurfaceWidget for proper disposal. Replace empty catch blocks in GestureManager with logged exception handling. Add WebKitNative.Cleanup() and GtkNative.ClearCallbacks() methods for application shutdown.
This commit is contained in:
@@ -61,7 +61,7 @@ public class NotificationService
|
||||
_dBusMonitor?.Dispose();
|
||||
_dBusMonitor = null;
|
||||
}
|
||||
catch { }
|
||||
catch (Exception ex) { DiagnosticLog.Debug("NotificationService", "D-Bus monitor cleanup failed", ex); }
|
||||
}
|
||||
|
||||
private async Task MonitorNotificationSignals()
|
||||
@@ -155,7 +155,7 @@ public class NotificationService
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
catch (Exception ex) { DiagnosticLog.Debug("NotificationService", "Action invoked processing failed", ex); }
|
||||
}
|
||||
|
||||
private async Task ProcessNotificationClosed(StreamReader reader)
|
||||
@@ -192,7 +192,7 @@ public class NotificationService
|
||||
context?.Tag));
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
catch (Exception ex) { DiagnosticLog.Debug("NotificationService", "Notification closed processing failed", ex); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -270,7 +270,7 @@ public class NotificationService
|
||||
|
||||
_activeNotifications.TryRemove(notificationId, out _);
|
||||
}
|
||||
catch { }
|
||||
catch (Exception ex) { DiagnosticLog.Debug("NotificationService", "Notification cancel failed", ex); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user