On this example we add and remove a layer from a Google Maps Instance.
The thing is you need to explicitely disable the interaction and then execute the off() method in order to completely detach the layer from the map object, otherwise events will still be triggered and you'll have more than one infowindows and several log lines on the console.
via @jsanz