¡@

Home 

c# Programming Glossary: memory

Any decent C# profilers out there? [closed]

http://stackoverflow.com/questions/10644/any-decent-c-sharp-profilers-out-there

open source .Net Memory Profiler really good for memory leaks there's a trial version Edit Nprof has been replaced with..

Encrypt/Decrypt string in .NET

http://stackoverflow.com/questions/202011/encrypt-decrypt-string-in-net

null aesAlg.Clear Return the encrypted bytes from the memory stream. return outStr summary Decrypt the given string. Assumes..

Dependency Inject (DI) “friendly” library

http://stackoverflow.com/questions/2045904/dependency-inject-di-friendly-library

an implementation This principle is actually a quote from memory though from Design Patterns but it should always be your real..

Why .NET String is immutable? [duplicate]

http://stackoverflow.com/questions/2365272/why-net-string-is-immutable

but a minute's extra start up to save a massive amount of memory was a performance win in the case in question . With mutable..

Using AES encryption in C#

http://stackoverflow.com/questions/273452/using-aes-encryption-in-c-sharp

msEncrypt.ToArray Return the encrypted bytes from the memory stream. return encrypted static string DecryptStringFromBytes..

Returning IEnumerable<T> vs IQueryable<T>

http://stackoverflow.com/questions/2876616/returning-ienumerablet-vs-iqueryablet

matching the original query will have to be loaded into memory from the database. In code IQueryable Customer custs ... Later.. database then filtering out the non gold customers in the memory IEnumerable Customer custs ... Later on... var goldCustomers..

Performance differences between debug and release builds

http://stackoverflow.com/questions/4043821/performance-differences-between-debug-and-release-builds

When to use struct in C#?

http://stackoverflow.com/questions/521298/when-to-use-struct-in-c

should represent a single value. A struct should have a memory footprint less than 16 bytes. A struct should not be changed..

Proper use of the IDisposable interface

http://stackoverflow.com/questions/538060/proper-use-of-the-idisposable-interface

My question is does this make the garbage collector free memory used by MyCollection any faster than it normally would edit.. contained a million strings and you wanted to free that memory now rather than waiting for the garbage collector. Would the.. will free it. But do you really want to leave 250MB of memory just sitting there waiting for the garbage collector to eventually..

Fastest Way of Inserting in Entity Framework

http://stackoverflow.com/questions/5940225/fastest-way-of-inserting-in-entity-framework

199 sec commitCount 1000000 recreateContext false out of memory exception commitCount 1 recreateContext true more than 10 minutes..

How can I detect the encoding/codepage of a text file

http://stackoverflow.com/questions/90838/how-can-i-detect-the-encoding-codepage-of-a-text-file

Ain't No Such Thing As Plain Text. If you have a string in memory in a file or in an email message you have to know what encoding..

Load a WPF BitmapImage from a System.Drawing.Bitmap

http://stackoverflow.com/questions/94456/load-a-wpf-bitmapimage-from-a-system-drawing-bitmap

How about loading it from MemoryStream using MemoryStream memory new MemoryStream bitmap.Save memory ImageFormat.Png memory.Position.. using MemoryStream memory new MemoryStream bitmap.Save memory ImageFormat.Png memory.Position 0 BitmapImage bitmapImage new.. memory new MemoryStream bitmap.Save memory ImageFormat.Png memory.Position 0 BitmapImage bitmapImage new BitmapImage bitmapImage.BeginInit..

How do you get total amount of RAM the computer has?

http://stackoverflow.com/questions/105031/how-do-you-get-total-amount-of-ram-the-computer-has

amount of Available ram by setting counter.CategoryName Memory counter.Countername Available MBytes But I can't seem to find.. this question The p invoke way EDIT Changed to GlobalMemoryStatusEx to give accurate results heh StructLayout LayoutKind.Sequential.. class MEMORYSTATUSEX public uint dwLength public uint dwMemoryLoad public ulong ullTotalPhys public ulong ullAvailPhys public..

Any decent C# profilers out there? [closed]

http://stackoverflow.com/questions/10644/any-decent-c-sharp-profilers-out-there

nprof free but kinda old ProfileSharp open source .Net Memory Profiler really good for memory leaks there's a trial version..

Arrays, heap and stack and value types

http://stackoverflow.com/questions/1113819/arrays-heap-and-stack-and-value-types

of `intArray` 24 ”â € € € € € € € € € € € € € € € € € € Memory at address 0x4A963B68 value of refType would be something like.. of `refType.L` 16 ”â € € € € € € € € € € € € € € € € € € Memory at address 0x4AA4C288 value of intArray would be something like..

Cannot find the memory leak

http://stackoverflow.com/questions/13355496/cannot-find-the-memory-leak

private void RefreshTextData MemUsage.Text Device Total Memory long DeviceExtendedProperties.GetValue DeviceTotalMemory 1024.. Memory long DeviceExtendedProperties.GetValue DeviceTotalMemory 1024 1024 nCurrent Memory Usage long DeviceExtendedProperties.GetValue.. DeviceTotalMemory 1024 1024 nCurrent Memory Usage long DeviceExtendedProperties.GetValue ApplicationCurrentMemoryUsage..

Which is best for data store Struct/Classes?

http://stackoverflow.com/questions/1951186/which-is-best-for-data-store-struct-classes

if they are 2 distinct objects value type semantics struct Memory footprint of the object. If the object is huge and frequently..

The need for volatile modifier in double checked locking in .NET

http://stackoverflow.com/questions/1964731/the-need-for-volatile-modifier-in-double-checked-locking-in-net

in addition to limiting access to the block to one thread. Memory barriers make it so each thread reads the most current value.. s which on x86 and x64 on CLR are implemented with a MemoryBarrier . They may be finer grained on other systems. my answer.. it with Thread.VolatileRead or inserting a call to Thread.MemoryBarrier might be necessary for the code to work properly in a..

Why .NET String is immutable? [duplicate]

http://stackoverflow.com/questions/2365272/why-net-string-is-immutable

to y allows for considerable compiler optimisations. Memory saving optimisations are also possible. Interning and atomising..

How to get the CPU Usage in C#? [closed]

http://stackoverflow.com/questions/278071/how-to-get-the-cpu-usage-in-c

_Total ramCounter new PerformanceCounter Memory Available MBytes public string getCurrentCpuUsage return cpuCounter.NextValue..

Setting Objects to Null/Nothing after use in .NET

http://stackoverflow.com/questions/2785/setting-objects-to-null-nothing-after-use-in-net

on Dot Net Rocks here Jeffrey Richter on the Windows Memory Model and Richters book CLR via C# chapter 20 has a great treatment..

How much memory does a C#/.NET object use?

http://stackoverflow.com/questions/426396/how-much-memory-does-a-c-net-object-use

this question You could use a memory profiler like .NET Memory Profiler http memprofiler.com or CLR Profiler free share improve..

Learning .NET [closed]

http://stackoverflow.com/questions/49809/learning-net

C# I already know PHP Python Java and some C Pointers and Memory Management are not so good so I'm going to be able to do it..

Interprocess communication for Windows in C# (.NET 2.0)

http://stackoverflow.com/questions/50153/interprocess-communication-for-windows-in-c-sharp-net-2-0

sell a remoting toolkit that includes a Shared Memory Channel. http www.genuinechannels.com Index.aspx Ingo Rammer..

Convert DataTable to generic List?

http://stackoverflow.com/questions/545328/convert-datatable-to-generic-list

Why we think there might be a leak We are getting Out of Memory Errors. If a Page does not require business logic to use this..

Memory Leak in C#

http://stackoverflow.com/questions/620733/memory-leak-in-c-sharp

Leak in C# Is it ever possible in a managed system to leak..

Memory barrier generators

http://stackoverflow.com/questions/6581848/memory-barrier-generators

barrier generators Reading Joseph Albahari's threading tutorial.. Thread.VolatileRead and Thread.VolatileWrite Thread.MemoryBarrier The volatile keyword. Anything that starts a thread or..

Convert a bitmap into a byte array in C#?

http://stackoverflow.com/questions/7350679/convert-a-bitmap-into-a-byte-array-in-c

is convenient because it doesn't require a lot of code. Memory Stream public static byte ImageToByte2 Image img byte byteArray.. ImageToByte2 Image img byte byteArray new byte 0 using MemoryStream stream new MemoryStream img.Save stream System.Drawing.Imaging.ImageFormat.Png.. byte byteArray new byte 0 using MemoryStream stream new MemoryStream img.Save stream System.Drawing.Imaging.ImageFormat.Png..