Problem with calling from Unity
Posted: Mon Sep 12, 2011 4:18 pm
I am trying to call Camera SDK from Unity.
However, when I called a DLL function it die trying to create the single CameraManager::X()
In singleton.h
The "new T" was successful in allocating memory, but failed to continue to go to next line. So I suspect it might be dying in the constructor.
Any Ideas?
Thanks
David
However, when I called a DLL function it die trying to create the single CameraManager::X()
In singleton.h
Code: Select all
static T& X()
{
if (m_instance == 0)
{
if(m_Lock==0)
m_Lock = new LockItem();
m_Lock->Lock();
if(m_instance==0)
{
m_instance = new T; // << Die here
}
m_Lock->UnLock();
}
return *m_instance;
};
Any Ideas?
Thanks
David