Utilizing the rangy library in my project and reviewing the documentation for detach
: "Destroys the range when it is no longer to be used."
I am encountering a dilemma as there isn't a suitable location for me to invoke detach
in my code for certain ranges that I create using cloneRange
. Given that this code may be called multiple times in an editor, should I be concerned about potential memory consumption if I fail to call detach
, or will the garbage collection eventually handle unreferenced ranges?
In essence, my question is whether Rangy retains references to ranges created with cloneRange
, thereby inhibiting proper garbage collection.