Thread: Environment.Exit

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    Environment.Exit

    Hello everyone,


    When we call Environment.Exit to terminates a console application or a Windows service,

    1.

    All the expected finally blocks are ensured to be executed, so resource leak?

    2.

    No exception occured (i.e. when invoking Environment.Exit, no exception thrown, like invoking Thread.Abort will throw ThreadAbortException?)


    thanks in advance,
    George

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Dude, read the manuals before posting the same question!
    http://cboard.cprogramming.com/showthread.php?t=102337
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Salem,


    The link you quoted is about Application.Exit, but I am discussing Environment.Exit. :-)

    Quote Originally Posted by Salem View Post
    Dude, read the manuals before posting the same question!
    http://cboard.cprogramming.com/showthread.php?t=102337

    regards,
    George

Popular pages Recent additions subscribe to a feed