In this module I'm working on I have a listener to a 'resize' event in the window. Every time the module is ran, I need to check if there's already a listener registered to that event and detach it, in order to avoid unwanted behavior, memory leaks and etc. 

So far so good, but, in this application we are working on, chances are that some handlers are already attached to the 'resize' event and I can't call `$(window).off('resize')`, as this would flush all the other event handlers previously registered by other plugins or modules.

Being that said, I would like to know if there's a way to identify my handler and only detach things that I have registered myself. How do I set an identifier to my event handler in order to be referenced in the `.off()` function?

Any help would be nice.