forked from MapComplete/MapComplete
Performance: attempt to fix actor leak
This commit is contained in:
parent
ed49bc2f2f
commit
1fa8ba2274
1 changed files with 5 additions and 0 deletions
|
@ -25,6 +25,10 @@
|
|||
|
||||
onDestroy(Zoomcontrol.createLock())
|
||||
|
||||
let destroyed = false
|
||||
onDestroy(() => {
|
||||
destroyed = true
|
||||
})
|
||||
async function initPhotosphere() {
|
||||
const imageInfo: Feature<Point, PanoramaView> = await image.provider.getPanoramaInfo(image)
|
||||
if (imageInfo === undefined) {
|
||||
|
@ -37,6 +41,7 @@
|
|||
} else {
|
||||
nearbyFeatures.addCallbackAndRunD((feats) => {
|
||||
viewer.setNearbyFeatures(feats)
|
||||
return destroyed
|
||||
})
|
||||
}
|
||||
isLoaded.set(true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue