diff --git a/Dalamud/Interface/Windowing/WindowSystem.cs b/Dalamud/Interface/Windowing/WindowSystem.cs
index 6c9789735..516f3c21b 100644
--- a/Dalamud/Interface/Windowing/WindowSystem.cs
+++ b/Dalamud/Interface/Windowing/WindowSystem.cs
@@ -62,6 +62,8 @@ public class WindowSystem
///
/// Add a window to this .
+ /// The window system doesn't own your window, it just renders it
+ /// You need to store a reference to it to use it later.
///
/// The window to add.
public void AddWindow(Window window)
@@ -74,6 +76,7 @@ public class WindowSystem
///
/// Remove a window from this .
+ /// Will not dispose your window, if it is disposable.
///
/// The window to remove.
public void RemoveWindow(Window window)
@@ -81,31 +84,21 @@ public class WindowSystem
if (!this.windows.Contains(window))
throw new ArgumentException("This window is not registered on this WindowSystem.");
- if (window is IDisposable disposable)
- disposable.Dispose();
-
this.windows.Remove(window);
}
///
/// Remove all windows from this .
+ /// Will not dispose your windows, if they are disposable.
///
- public void RemoveAllWindows()
- {
- foreach (var window in this.windows)
- {
- if (window is IDisposable disposable)
- disposable.Dispose();
- }
-
- this.windows.Clear();
- }
+ public void RemoveAllWindows() => this.windows.Clear();
///
/// Get a window by name.
///
/// The name of the .
/// The object with matching name or null.
+ [Obsolete("WindowSystem does not own your window - you should store a reference to it and use that instead.")]
public Window? GetWindow(string windowName) => this.windows.FirstOrDefault(w => w.WindowName == windowName);
///