Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Michael Losinski

@Michael Losinski
About
Posts
2
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • What this 'null' check doing here...
    M Michael Losinski

    Yes you could the code down to one line of code. You could catch the exception somewhere else, so I suppose the question could then become what do you do in a mission critical system when outofmemory exception or an allocation fails, therefore allowing you to gracefully shutdown. First thing that comes to mind is if the current thread is not mission critical you can kill that can free up some memory. Second, you could have a fail-safe that would allow you to kill all non-mission critical threads thus freeing memory. With the right permissions you could also kill the other applications. I've never implemented one but you could also have a "memory para-shoot" that at the start of the program allocates a chunk of memory and frees it when needed. I suppose allot of it depend on the system and requirements.

    The Weird and The Wonderful csharp dotnet wcf

  • What this 'null' check doing here...
    M Michael Losinski

    The only thing that I can think of is technically new doesn't guarantee that the variable initialization will take place. In programming languages like c++ it could return null. This could happen if the memory was so fragmented that the allocation failed. However, instead of returning null in C# I believe it throws a out of memory exception. I have only seen this done in system critical embedded systems.

    The Weird and The Wonderful csharp dotnet wcf
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups