c# - compare 2 managed object addresses in unmanaged code -
breaking head solution problem, need compare 2 managed object in unmanaged code.
i.e compare if accessed managed object,the compaction in unmanaged code.
my first idea pass memory address, got no success getting object address in c# (also can't pin object)
i'm using existing c++ code implement comparison comparing addresses.
some code example idea:
c# code:
object obj ; if (isobjaccessed(obj)) { // } else { // serializeobject saveaccessedobject(obj); } ====================================================
c++ code:
bool isobjaccessed(uint8* address) ; void saveaccessedobject(uint8* address) ;
Comments
Post a Comment