Skip to content

Delete commands destroy context - #19

Open
maeneak wants to merge 2 commits into
astrosat:masterfrom
maeneak:remove-bug
Open

Delete commands destroy context#19
maeneak wants to merge 2 commits into
astrosat:masterfrom
maeneak:remove-bug

Conversation

@maeneak

@maeneak maeneak commented Jun 5, 2019

Copy link
Copy Markdown

delete commands destroy the gl context causing failure when removing and adding layers to re-create the source.

@maeneak

maeneak commented Jun 5, 2019

Copy link
Copy Markdown
Author

Also added line to remove 'move' hook #16

@gampleman

Copy link
Copy Markdown
Contributor

I'm not sure this is the right way to handle this. In theory the map and gl references are no longer valid after onRemove (and potentially should be allowed to be garbage collected). These references should be re-added when onAdd gets called again.

So if this is causing errors, the bug is likely somewhere else (i.e. code assuming gl context is running after onRemove has been called).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants