mirror of https://github.com/AxioDL/boo.git
Ensure boo IObj instances are heap-allocated
This commit is contained in:
parent
403249582a
commit
49d76b84be
|
@ -10,8 +10,9 @@ namespace boo
|
|||
class IObj
|
||||
{
|
||||
std::atomic_int m_refCount = {0};
|
||||
public:
|
||||
protected:
|
||||
virtual ~IObj() = default;
|
||||
public:
|
||||
virtual std::unique_lock<std::recursive_mutex> destructorLock() { return {}; }
|
||||
void increment() { m_refCount++; }
|
||||
void decrement()
|
||||
|
|
|
@ -1231,6 +1231,8 @@ struct MetalCommandQueue : IGraphicsCommandQueue
|
|||
if (!m_running)
|
||||
return;
|
||||
|
||||
@autoreleasepool
|
||||
{
|
||||
/* Update dynamic data here */
|
||||
MetalDataFactoryImpl* gfxF = static_cast<MetalDataFactoryImpl*>(m_parent->getDataFactory());
|
||||
std::unique_lock<std::recursive_mutex> datalk(gfxF->m_dataMutex);
|
||||
|
@ -1257,8 +1259,6 @@ struct MetalCommandQueue : IGraphicsCommandQueue
|
|||
}
|
||||
datalk.unlock();
|
||||
|
||||
@autoreleasepool
|
||||
{
|
||||
[m_enc endEncoding];
|
||||
m_enc = nullptr;
|
||||
|
||||
|
|
Loading…
Reference in New Issue