Custom Editor window close event...?

Hey people,can anyone guide me how to fire an event/function when I close my custom editor window.

//Display the Custom Window
CustomWindow window = (CustomWindow ) EditorWindow.GetWindow(typeof(CustomWindow));
window.Init();

The CustomWindow Class should have a function that will be fired when I close this CustomWindow.

You can use the callback function OnDestroy for that.