¡@

Home 

c# Programming Glossary: lifetime

Cannot use ref or out parameter in lambda expressions

http://stackoverflow.com/questions/1365689/cannot-use-ref-or-out-parameter-in-lambda-expressions

question Lambdas have the appearance of changing the lifetime of variables that they capture. For instance the following lambda.. in the following ways ref parameters may have a fixed lifetime. Consider passing a local variable as a ref parameter to a function...

Complex UI inside ListBoxItem

http://stackoverflow.com/questions/15532639/complex-ui-inside-listboxitem

a way that if I have say 1 million items it doesn't take a lifetime to load the UI and only render what's visible on screen 5 Say.. a way that if I have say 1 million items it doesn't take a lifetime to load the UI and only render what's visible on screen Not..

Understanding Garbage Collection in .net

http://stackoverflow.com/questions/17130382/understanding-garbage-collection-in-net

all. Its only duty is to modify that table. It extends the lifetime of the local variable preventing the reference it stores from..

Why .NET String is immutable? [duplicate]

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

to such a string will always equal abc throughout its lifetime which does require immutability makes uses as keys where maintaining..

C# Object Pooling Pattern implementation

http://stackoverflow.com/questions/2510975/c-sharp-object-pooling-pattern-implementation

of the resource being pooled the expected required lifetime of objects the real reason that the pool is required etc. Typically..

What is managed/unmanaged code in C#?

http://stackoverflow.com/questions/334326/what-is-managed-unmanaged-code-in-c

language integration code access security and automatic lifetime control of objects. All code based on IL executes as managed..

Image.Save(..) throws a GDI+ exception because the memory stream is closed

http://stackoverflow.com/questions/336387/image-save-throws-a-gdi-exception-because-the-memory-stream-is-closed

that constructor say You must keep the stream open for the lifetime of the Bitmap. I can't find any docs promising to close the..

Garbage collection when using anonymous delegates for event handling

http://stackoverflow.com/questions/371109/garbage-collection-when-using-anonymous-delegates-for-event-handling

code I have an event publisher which exists for the whole lifetime of the application here reduced to bare essentials public class.. vast majority of cases the subscribers also live for the lifetime of the application. I've fiddled around a while with Dustin..

GetHashCode Guidelines in C#

http://stackoverflow.com/questions/462451/gethashcode-guidelines-in-c-sharp

same hash code and the hash code has to be valid for the lifetime of the object. If the hash code changes you end up with an object.. bin 1. This is why the hash code must not change for the lifetime of the object and just one reason why writing GetHashCode implementations.. between guideline and rule. I struck through for the lifetime of the object . A guideline is just a guide not a rule. In reality..

When to use struct in C#?

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

could be well over 16 bytes Entry has an undetermined lifetime from Add to Remove Clear or garbage collection And ... 4. Both..

If strings are immutable in .NET, then why does Substring take O(n) time?

http://stackoverflow.com/questions/6742923/if-strings-are-immutable-in-net-then-why-does-substring-take-on-time

extracted are typically small in size and short in lifetime the garbage collector is going to reclaim them soon and they..

Single Form Hide on Startup

http://stackoverflow.com/questions/70272/single-form-hide-on-startup

new MainForm This creates a new main form and limits the lifetime of the application to the lifetime of the main form. However.. form and limits the lifetime of the application to the lifetime of the main form. However if you remove the parameter to Application.Run..

How do you reconcile IDisposable and IoC?

http://stackoverflow.com/questions/987761/how-do-you-reconcile-idisposable-and-ioc

you should Dispose it or it could be an instance whose lifetime is managed elsewhere and therefor you'd better not . Nothing..

Questions about Entity Framework Context Lifetime

http://stackoverflow.com/questions/10777630/questions-about-entity-framework-context-lifetime

about Entity Framework Context Lifetime I have some questions about the desired lifetime of an Entity..

How to configure Simple Injector to run background threads in ASP.NET MVC

http://stackoverflow.com/questions/11041601/how-to-configure-simple-injector-to-run-background-threads-in-asp-net-mvc

DiUnitOfWork container.RegisterLifetimeScope IScopeUnitOfWork DiUnitOfWork Register as hybrid PerWebRequest.. DiUnitOfWork Register as hybrid PerWebRequest PerLifetimeScope. container.Register IUnitOfWork if HttpContext.Current.. Since you are registering the unit of work as Per Lifetime Scope you must explicitly create and dispose a Lifetime Scope..

Mixed lifestyle for Per Thread and Per Web Request with Simple Injector

http://stackoverflow.com/questions/13147509/mixed-lifestyle-for-per-thread-and-per-web-request-with-simple-injector

probably be better when you mix Per Web Request with Per Lifetime Scope since with the Lifetime Scope you explicitly start and.. mix Per Web Request with Per Lifetime Scope since with the Lifetime Scope you explicitly start and finish the scope and can dispose.. HttpContext.Current null new WebRequestLifestyle new LifetimeScopeLifestyle Register as hybrid PerWebRequest PerLifetimeScope...

Should data contexts be static?

http://stackoverflow.com/questions/4081071/should-data-contexts-be-static

out there covering the details Linq to SQL DataContext Lifetime Management Rick Strahl's Web Log may not seem relevant but still.. is Making Entity Framework v1 work Part 1 DataContext Lifetime Management for a possible alternative if you don't like Rick's..

Unity 2.0 and handling IDisposable types (especially with PerThreadLifetimeManager)

http://stackoverflow.com/questions/5129789/unity-2-0-and-handling-idisposable-types-especially-with-perthreadlifetimemanag

and handling IDisposable types especially with PerThreadLifetimeManager I know that similar question was asked several times.. versions of Unity where the answer was dependent on used LifetimeManager class. Documentation says Unity uses specific types that.. says Unity uses specific types that inherit from the LifetimeManager base class collectively referred to as lifetime managers..

How to Identify where Instances of an object are Still Referenced?

http://stackoverflow.com/questions/5818802/how-to-identify-where-instances-of-an-object-are-still-referenced

Referenced After running the VS2010 profiler with Object Lifetime Tracking in my app I have this on a particular class Number..

C# Static variables - scope and persistence

http://stackoverflow.com/questions/5986051/c-sharp-static-variables-scope-and-persistence