mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-07 16:39:15 +00:00
cc229d4b05
Previously, the "impl" object was never properly constructed or destructed, but it more or less worked out since the memory was initialized to zero bytes and each member had trivial constructors. Except std::shared_ptr, but an all zero storage happened to be equivalent to a default constructed shared_ptr. However, there was the still the problem that the shared_ptr was never destructed, so it kept the referenced `Camera` object alive, which lead to memory leaks. An additional, somewhat unrelated change is that the "props" struct is removed, and the device identifier is now stored in an `std::string`. The reason is that `CameraManager::get()` already takes a const std::string reference, so an std::string must be constructed in any case, so we might as well take advantage of that and use `std::string` in the "impl" object as well. Furthermore, wrap the `impl` struct in an anonymous namespace to avoid name resolution problems. |
||
---|---|---|
.. | ||
examples | ||
include | ||
plugins | ||
tests | ||
tools | ||
meson.build |