mirror of
https://github.com/urbit/shrub.git
synced 2024-12-24 20:47:27 +03:00
VirtualScroller: aggressively cleanup refs
Prevents a memory leak, as it appears React holds onto the class instance after unmounting
This commit is contained in:
parent
bc4f26b2b3
commit
6a1f0e2ac9
@ -222,9 +222,8 @@ export default class VirtualScroller<T> extends Component<VirtualScrollerProps<T
|
|||||||
if(this.cleanupRefInterval) {
|
if(this.cleanupRefInterval) {
|
||||||
clearInterval(this.cleanupRefInterval);
|
clearInterval(this.cleanupRefInterval);
|
||||||
}
|
}
|
||||||
if(this.initScroll) {
|
this.cleanupRefs();
|
||||||
clearTimeout(this.initScroll);
|
this.childRefs.clear();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
startOffset() {
|
startOffset() {
|
||||||
|
Loading…
Reference in New Issue
Block a user