Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move WeakPtrFactory in map_renderer.hpp #2861

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/mbgl/util/run_loop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class RunLoop : public Scheduler, private util::noncopyable {

std::unique_ptr<Impl> impl;
::mapbox::base::WeakPtrFactory<Scheduler> weakFactory{this};
// Do not add members here, see `WeakPtrFactory`
};

} // namespace util
Expand Down
4 changes: 3 additions & 1 deletion platform/android/MapLibreAndroid/src/cpp/map_renderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,12 @@ class MapRenderer : public Scheduler {
std::atomic<bool> destroyed{false};

std::unique_ptr<SnapshotCallback> snapshotCallback;
mapbox::base::WeakPtrFactory<Scheduler> weakFactory{this};

bool framebufferSizeChanged = false;
bool swapBehaviorFlush = false;

mapbox::base::WeakPtrFactory<Scheduler> weakFactory{this};
// Do not add members here, see `WeakPtrFactory`
};

} // namespace android
Expand Down
1 change: 1 addition & 0 deletions platform/qt/src/utils/scheduler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class Scheduler : public QObject, public mbgl::Scheduler {
std::atomic<std::size_t> pendingItems;
std::queue<std::function<void()>> m_taskQueue;
mapbox::base::WeakPtrFactory<Scheduler> weakFactory{this};
// Do not add members here, see `WeakPtrFactory`
};

} // namespace QMapLibre
Loading