94 references to Alloc
aspire (2)
Processes\WindowsProcessInterop.cs (2)
398var pinnedHandles = GCHandle.Alloc(handles, GCHandleType.Pinned); 420pinnedJobHandles = GCHandle.Alloc(jobHandles, GCHandleType.Pinned);
ILCompiler.ReadyToRun (2)
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (1)
670handle = GCHandle.Alloc(obj, GCHandleType.Pinned);
TypeSystem\Mutable\MutableModule.cs (1)
229System.Runtime.InteropServices.GCHandle.Alloc(metadataArray, System.Runtime.InteropServices.GCHandleType.Pinned);
ILCompiler.RyuJit (1)
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (1)
670handle = GCHandle.Alloc(obj, GCHandleType.Pinned);
Microsoft.AspNetCore.Server.HttpSys (1)
RequestProcessing\ResponseBody.cs (1)
274handle = GCHandle.Alloc(buffer.Array, GCHandleType.Pinned);
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\ComInterop\ComRuntimeHelpers.cs (1)
327pinningHandle = GCHandle.Alloc(null, GCHandleType.Pinned);
Microsoft.ML.LightGbm (2)
WrappedLightGbmDataset.cs (2)
60gcValues[i] = GCHandle.Alloc(sampleValuePerColumn[i], GCHandleType.Pinned); 62gcIndices[i] = GCHandle.Alloc(sampleIndicesPerColumn[i], GCHandleType.Pinned);
Microsoft.ML.Mkl.Components (2)
SymSgdClassificationTrainer.cs (2)
346GcHandle = GCHandle.Alloc(Buffer, GCHandleType.Pinned); 739stateGCHandle = GCHandle.Alloc(state, GCHandleType.Pinned);
Microsoft.ML.Vision (2)
ImageClassificationTrainer.cs (2)
975var featureBufferHandle = GCHandle.Alloc(featuresBuffer, GCHandleType.Pinned); 977var labelBufferHandle = GCHandle.Alloc(labelBuffer, GCHandleType.Pinned);
Microsoft.NET.StringTools (1)
WeakStringCache.cs (1)
80weakHandle = GCHandle.Alloc(str, GCHandleType.Weak);
Mono.Cecil.Pdb (1)
Mono.Cecil.Pdb\SymWriter.cs (1)
158 var handle = GCHandle.Alloc (metadata, GCHandleType.Pinned);
PresentationCore (5)
MS\Internal\FontCache\FontSource.cs (1)
433_memoryHandle = GCHandle.Alloc(bits, GCHandleType.Pinned);
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\CharacterBuffer.cs (2)
220gcHandle = GCHandle.Alloc(_characterArray, GCHandleType.Pinned); 319gcHandle = GCHandle.Alloc(_string, GCHandleType.Pinned);
System\Windows\Media\EventProxy.cs (1)
138m_handle = System.Runtime.InteropServices.GCHandle.Alloc(epw, System.Runtime.InteropServices.GCHandleType.Normal)
System\Windows\Media\StreamAsIStream.cs (1)
657sd.m_handle = System.Runtime.InteropServices.GCHandle.Alloc(sais, System.Runtime.InteropServices.GCHandleType.Normal);
PresentationFramework (2)
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (2)
51m._gchandle = GCHandle.Alloc(value, GCHandleType.Pinned); 276public MarshalerArray(Array array) => _gchandle = GCHandle.Alloc(array, GCHandleType.Pinned);
System.Data.OleDb (3)
ColumnBinding.cs (3)
700_pinnedBuffer = GCHandle.Alloc(value, GCHandleType.Pinned); 747_pinnedBuffer = GCHandle.Alloc(value, GCHandleType.Pinned); 766_pinnedBuffer = GCHandle.Alloc(value, GCHandleType.Pinned);
System.Diagnostics.EventLog (4)
System\Diagnostics\EventLog.cs (2)
890GCHandle stringsRoot = GCHandle.Alloc(addresses, GCHandleType.Pinned); 901handles[i] = GCHandle.Alloc(insertionStrings[i], GCHandleType.Pinned);
System\Diagnostics\EventLogInternal.cs (2)
1381GCHandle stringsRootHandle = GCHandle.Alloc(stringRoots, GCHandleType.Pinned); 1386stringHandles[strIndex] = GCHandle.Alloc(strings[strIndex], GCHandleType.Pinned);
System.DirectoryServices (2)
Interop\AdsValueHelper2.cs (2)
265_pinnedHandle = GCHandle.Alloc(managedValue, GCHandleType.Pinned); 274_pinnedHandle = GCHandle.Alloc(bytes, GCHandleType.Pinned);
System.Drawing.Common (1)
System\Drawing\Font.cs (1)
293GCHandle handle = GCHandle.Alloc(logFont, GCHandleType.Pinned);
System.Net.Http.WinHttpHandler (3)
System\Net\Http\WinHttpHandler.cs (1)
1310GCHandle pinnedHandle = GCHandle.Alloc(proxyInfo, GCHandleType.Pinned);
System\Net\Http\WinHttpRequestState.cs (2)
171_cachedReceivePinnedBuffer = GCHandle.Alloc(buffer, GCHandleType.Pinned); 184_cachedSendPinnedBuffer = GCHandle.Alloc(buffer, GCHandleType.Pinned);
System.Net.Quic (5)
System\Net\Quic\QuicConnection.cs (2)
319GCHandle context = GCHandle.Alloc(this, GCHandleType.Weak); 353GCHandle context = GCHandle.Alloc(this, GCHandleType.Weak);
System\Net\Quic\QuicListener.cs (1)
123GCHandle context = GCHandle.Alloc(this, GCHandleType.Weak);
System\Net\Quic\QuicStream.cs (2)
198GCHandle context = GCHandle.Alloc(this, GCHandleType.Weak); 240GCHandle context = GCHandle.Alloc(this, GCHandleType.Weak);
System.Net.Sockets (3)
System\Net\Sockets\SocketPal.Unix.cs (3)
311handles[i] = GCHandle.Alloc(buffer.Array, GCHandleType.Pinned); 425handles[i] = GCHandle.Alloc(buffer.Array, GCHandleType.Pinned); 564handles[i] = GCHandle.Alloc(buffer.Array, GCHandleType.Pinned);
System.Numerics.Tensors (1)
System\Numerics\Tensors\netcore\Tensor_1.cs (1)
210GCHandle handle = GCHandle.Alloc(_values, GCHandleType.Pinned);
System.Private.CoreLib (13)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventProvider.cs (1)
605rgGCHandle[i] = GCHandle.Alloc(dataRefObj[i], GCHandleType.Pinned);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\DataCollector.cs (1)
327*pinsTemp = GCHandle.Alloc(value, GCHandleType.Pinned);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\PinnedBufferMemoryStream.cs (1)
22_pinningHandle = GCHandle.Alloc(array, GCHandleType.Pinned);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Memory.cs (2)
401GCHandle handle = GCHandle.Alloc(tmpObject, GCHandleType.Pinned); 420GCHandle handle = GCHandle.Alloc(tmpObject, GCHandleType.Pinned);
src\runtime\src\libraries\System.Private.CoreLib\src\System\ReadOnlyMemory.cs (2)
316GCHandle handle = GCHandle.Alloc(tmpObject, GCHandleType.Pinned); 335GCHandle handle = GCHandle.Alloc(tmpObject, GCHandleType.Pinned);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (1)
723_nativeObjectWrapperWeakHandle = GCHandle.Alloc(this, GCHandleType.Weak);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (2)
102var thisHandle = GCHandle.Alloc(this, IsCollectible ? GCHandleType.WeakTrackResurrection : GCHandleType.Normal); 148var thisStrongHandle = GCHandle.Alloc(this, GCHandleType.Normal);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Overlapped.cs (2)
171GCHandleRef(pNativeOverlapped, (nuint)(i + 1)) = GCHandle.Alloc(objArray[i], GCHandleType.Pinned); 177GCHandleRef(pNativeOverlapped, 1) = GCHandle.Alloc(userData, GCHandleType.Pinned);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitSubsystem.HandleManager.Unix.cs (1)
49IntPtr handle = GCHandle.ToIntPtr(GCHandle.Alloc(waitableObject, GCHandleType.Normal));
System.Private.Windows.Core (1)
Windows\Win32\System\Variant\VARIANT.cs (1)
276pin = GCHandle.Alloc(array, GCHandleType.Pinned);
System.Reflection.Metadata (2)
System\Reflection\Internal\Utilities\PinnedObject.cs (1)
28_handle = GCHandle.Alloc(obj, GCHandleType.Pinned);
System\Reflection\Metadata\Internal\VirtualHeap.cs (1)
103var blob = new PinnedBlob(GCHandle.Alloc(value, GCHandleType.Pinned), value.Length);
System.Resources.Extensions (1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\PinnedBufferMemoryStream.cs (1)
22_pinningHandle = GCHandle.Alloc(array, GCHandleType.Pinned);
System.Runtime.InteropServices.JavaScript (2)
System\Runtime\InteropServices\JavaScript\JSHostImplementation.Types.cs (1)
26GCHandle = (IntPtr)InteropServices.GCHandle.Alloc(this, GCHandleType.Normal);
System\Runtime\InteropServices\JavaScript\JSProxyContext.cs (1)
331IntPtr result = (IntPtr)GCHandle.Alloc(obj, handleType);
System.Security.Cryptography (1)
System\Security\Cryptography\CryptoStream.cs (1)
724GCHandle pinHandle = GCHandle.Alloc(rentedBuffer, GCHandleType.Pinned);
System.Security.Principal.Windows (1)
System\Security\Principal\SID.cs (1)
970HandleArray[currentSid] = GCHandle.Alloc(sid.BinaryForm, GCHandleType.Pinned);
System.ServiceProcess.ServiceController (1)
System\ServiceProcess\ServiceController.cs (1)
896argPtrsHandle = GCHandle.Alloc(argPtrs, GCHandleType.Pinned);
System.Speech (24)
Internal\SapiInterop\SapiRecoInterop.cs (3)
476GCHandle handle = GCHandle.Alloc(word.Text, GCHandleType.Pinned); 483GCHandle handle = GCHandle.Alloc(word.LexicalForm, GCHandleType.Pinned); 494GCHandle handle = GCHandle.Alloc(word.Pronunciation, GCHandleType.Pinned);
Internal\Synthesis\AudioBase.cs (3)
380GCHandle gc = GCHandle.Alloc(waveHeader, GCHandleType.Pinned); 403GCHandle gc = GCHandle.Alloc(waveHeader, GCHandleType.Pinned); 413GCHandle gc = GCHandle.Alloc(this, GCHandleType.Pinned);
Internal\Synthesis\ConvertTextFrag.cs (4)
33sapiFrag.gcText = GCHandle.Alloc(textFragment.TextToSpeak, GCHandleType.Pinned); 67sapiFrag.gcPhoneme = GCHandle.Alloc(ssmlState.Phoneme, GCHandleType.Pinned); 109sapiFragLast = GCHandle.Alloc(sapiFrag, GCHandleType.Pinned); 120sapiFrag.gcSayAsCategory = GCHandle.Alloc(sFormat, GCHandleType.Pinned);
Internal\Synthesis\TTSEngineProxy.cs (2)
61GCHandle gc = GCHandle.Alloc(wfx, GCHandleType.Pinned); 148GCHandle gc = GCHandle.Alloc(wfx, GCHandleType.Pinned);
Internal\Synthesis\TTSVoice.cs (1)
98targetFormat = GCHandle.Alloc(targetWaveFormat, GCHandleType.Pinned);
Internal\Synthesis\WaveHeader.cs (2)
20_gcHandle = GCHandle.Alloc(buffer, GCHandleType.Pinned); 79_gcHandleWaveHdr = GCHandle.Alloc(_waveHdr, GCHandleType.Pinned);
Recognition\RecognizerBase.cs (1)
1578GCHandle gcHandle = GCHandle.Alloc(data, GCHandleType.Pinned);
Result\RecognitionResult.cs (4)
156GCHandle gc = GCHandle.Alloc(_sapiAudioBlob, GCHandleType.Pinned); 296GCHandle gc = GCHandle.Alloc(sapiResultBlob, GCHandleType.Pinned); 357GCHandle gc = GCHandle.Alloc(_sapiAlternatesBlob, GCHandleType.Pinned); 484GCHandle gc = GCHandle.Alloc(_phraseBuffer, GCHandleType.Pinned);
Result\RecognizedPhrase.cs (4)
166GCHandle gc = GCHandle.Alloc(_phraseBuffer, GCHandleType.Pinned); 290GCHandle gc = GCHandle.Alloc(_phraseBuffer, GCHandleType.Pinned); 412GCHandle gc = GCHandle.Alloc(_phraseBuffer, GCHandleType.Pinned); 782GCHandle gc = GCHandle.Alloc(_phraseBuffer, GCHandleType.Pinned);
System.Windows.Forms (4)
System\Windows\Forms\Control.ControlNativeWindow.cs (1)
43_rootRef = GCHandle.Alloc(GetControl(), GCHandleType.Normal);
System\Windows\Forms\NativeWindow.cs (2)
245GCHandle root = GCHandle.Alloc(window, GCHandleType.Weak); 735s_windowHandles[hwnd] = GCHandle.Alloc(window.PreviousWindow, GCHandleType.Weak);
System\Windows\Forms\NotifyIcon.NotifyIconNativeWindow.cs (1)
43_rootRef = GCHandle.Alloc(_reference, GCHandleType.Normal);