Hi all,
i've just encountered a problem with pinning. it seems as if a managed object is moved altough a pinning pointer to this object is still alive
code snippet:
ManagedObject __pin* pManagedObject = &this->managedObjec t;
/*lots of unmanaged memory allocation*/
//here pManagedObject contains lots of garbage
UnmanagedRoutin e(pManagedObjec t);
//this solves the problem, but the pointer value is different to pManagedObject!
ManagedObject __pin* pNewPinningPtr = &this->managedObjec t;
UnmanagedRoutin g(pNewPinningPt r);
any idea why this can happen?
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>EIrcWZO37Eq fPK9DbYlKGA==</Id>