[android] fix ownership of style layer after delete
This commit is contained in:
committed by
Ivo van Dongen
parent
f0de56cffa
commit
609cdb0fd7
@@ -9,14 +9,27 @@
|
||||
namespace mbgl {
|
||||
namespace android {
|
||||
|
||||
/**
|
||||
* Creates an owning peer object (for layers not attached to the map) from the JVM side
|
||||
*/
|
||||
BackgroundLayer::BackgroundLayer(jni::JNIEnv& env, jni::String layerId)
|
||||
: Layer(env, std::make_unique<mbgl::style::BackgroundLayer>(jni::Make<std::string>(env, layerId))) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a non-owning peer object (for layers currently attached to the map)
|
||||
*/
|
||||
BackgroundLayer::BackgroundLayer(mbgl::Map& map, mbgl::style::BackgroundLayer& coreLayer)
|
||||
: Layer(map, coreLayer) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an owning peer object (for layers not attached to the map)
|
||||
*/
|
||||
BackgroundLayer::BackgroundLayer(mbgl::Map& map, std::unique_ptr<mbgl::style::BackgroundLayer> coreLayer)
|
||||
: Layer(map, std::move(coreLayer)) {
|
||||
}
|
||||
|
||||
BackgroundLayer::~BackgroundLayer() = default;
|
||||
|
||||
// Property getters
|
||||
|
||||
Reference in New Issue
Block a user