CARLA
 
载入中...
搜索中...
未找到
carla/Buffer.cpp
浏览该文件的文档.
1#include "carla/Buffer.h" // 包含 Buffer 头文件,定义 Buffer 类
2
3#include "carla/BufferPool.h" // 包含 BufferPool 头文件,定义 BufferPool 类
4
5namespace carla {
6
7 void Buffer::ReuseThisBuffer() { // 定义 Buffer 类的 ReuseThisBuffer 方法
8 auto pool = _parent_pool.lock(); // 尝试锁定指向父池的弱指针
9 if (pool != nullptr) { // 检查池是否有效(非空)
10 pool->Push(std::move(*this)); // 将当前 Buffer 实例移动到池的 Push 方法中
11 }
12 }
13
14} // namespace carla
void ReuseThisBuffer()
std::weak_ptr< BufferPool > _parent_pool
CARLA模拟器的主命名空间。
Definition Carla.cpp:139