3 writes to _unmanagedHandles
PresentationFramework (3)
src\Framework\MS\Internal\PtsHost\PtsContext.cs (3)
58
_unmanagedHandles
= new HandleIndex[_defaultHandlesCapacity]; // Limit initial size
180
_unmanagedHandles
= null;
479
_unmanagedHandles
= newItems;
28 references to _unmanagedHandles
PresentationFramework (28)
src\Framework\MS\Internal\PtsHost\PtsContext.cs (28)
131
if (Invariant.Strict &&
_unmanagedHandles
!= null)
136
for (index = 0; index <
_unmanagedHandles
.Length; ++index)
138
Object obj =
_unmanagedHandles
[index].Obj;
203
if (
_unmanagedHandles
[0].Index == 0)
209
long handle =
_unmanagedHandles
[0].Index;
210
_unmanagedHandles
[0].Index =
_unmanagedHandles
[handle].Index;
211
_unmanagedHandles
[handle].Obj = obj;
212
_unmanagedHandles
[handle].Index = 0;
229
Invariant.Assert(handleLong > 0 && handleLong <
_unmanagedHandles
.Length, "Invalid object handle.");
230
Invariant.Assert(
_unmanagedHandles
[handleLong].IsHandle(), "Handle has been already released.");
231
_unmanagedHandles
[handleLong].Obj = null;
232
_unmanagedHandles
[handleLong].Index =
_unmanagedHandles
[0].Index;
233
_unmanagedHandles
[0].Index = handleLong;
247
if (handleLong < 0 || handleLong >=
_unmanagedHandles
.Length)
251
return
_unmanagedHandles
[handleLong].IsHandle();
266
Invariant.Assert(handleLong > 0 && handleLong <
_unmanagedHandles
.Length, "Invalid object handle.");
267
Invariant.Assert(
_unmanagedHandles
[handleLong].IsHandle(), "Handle has been already released.");
268
return
_unmanagedHandles
[handleLong].Obj;
458
_unmanagedHandles
[0].Index = freeIndex;
460
while (freeIndex <
_unmanagedHandles
.Length)
462
_unmanagedHandles
[freeIndex].Index = ++freeIndex;
465
_unmanagedHandles
[freeIndex - 1].Index = 0;
474
int freeIndex =
_unmanagedHandles
.Length;
477
HandleIndex[] newItems = new HandleIndex[
_unmanagedHandles
.Length * 2];
478
Array.Copy(
_unmanagedHandles
, newItems,
_unmanagedHandles
.Length);