I know that other people wrote similar questions, but I think mine is a different case, since I did not find any solution.
I have an object assignment, something very simple:
_buffer3 = buffer;
generated assembly code is as follows
mov edx,dword ptr [ebp-3Ch] mov eax,dword ptr [ebp-40h] lea edx,[edx+4] call 69C322F0
Now, to understand what was going on, I wanted to enter the call (why should the call be used in the task?). However, the code at this address does not exist, and I cannot enter. if I type the address in the address code field, then what is shown:
69C322F0 ???
Any help trying to solve this mystery? :)
Change ... so a mysterious call is added when a link is assigned inside a class method.
If I have this class:
private class Test { int _X; int _Y; Test _t; public void SetValues(int x, int y, Test t) { _X = x; _Y = y; } }
assembly generated for the SetValues โโmethod:
_X = x; 00000028 mov eax,dword ptr [ebp-3Ch] 0000002b mov edx,dword ptr [ebp-40h] 0000002e mov dword ptr [eax+8],edx _Y = y; 00000031 mov eax,dword ptr [ebp-3Ch] 00000034 mov edx,dword ptr [ebp+0Ch] 00000037 mov dword ptr [eax+0Ch],edx
what makes sense
however, if I write this
private class Test { int _X; int _Y; Test _t; public void SetValues(int x, int y, Test t) { _X = x; _Y = y; _t = t; } }
a mysterious call appears
_X = x; 00000028 mov eax,dword ptr [ebp-3Ch] 0000002b mov edx,dword ptr [ebp-40h] 0000002e mov dword ptr [eax+8],edx _Y = y; 00000031 mov eax,dword ptr [ebp-3Ch] 00000034 mov edx,dword ptr [ebp+0Ch] 00000037 mov dword ptr [eax+0Ch],edx _t = t; 0000003a mov edx,dword ptr [ebp-3Ch] 0000003d mov eax,dword ptr [ebp+8] 00000040 lea edx,[edx+4] 00000043 call 515E2E48
IMHO this is something related to garbage collection, but I canโt understand what it is, and I really would like to understand it. I know that one of you should know :)
Adding to the answer. This is an excerpt that I took from Google Books CLR Books through C #:
