stuartmorgan 478a785594 Improve C++ plugin lifetime handling (flutter/engine#17489)
This makes two changes:
- Adds a way to register a callback for when a FlutterDesktopPluginRegistrarRef is destroyed, and implements the logic to call it in the Windows and Linux embeddings.
- Adds a class to the C++ wrapper that handles making a singleton owning PluginRegistrar wrappers, and destroying them when the underlying reference goes away, to avoid needing that boilerplate code in every plugin's source.

Fixes https://github.com/flutter/flutter/issues/53496
2020-04-06 09:55:42 -07:00
..