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
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. OutOfMemoryException

OutOfMemoryException

Scheduled Pinned Locked Moved .NET (Core and Framework)
question
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rei Miyasaka
    wrote on last edited by
    #1

    Just curious... has anyone ever bothered catching it?

    L L 2 Replies Last reply
    0
    • R Rei Miyasaka

      Just curious... has anyone ever bothered catching it?

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      Yes you can actually try to create an out of memory error so you can catch it. However in normal development practices it would more likely fall into a general catch(Exception).

      led mike

      1 Reply Last reply
      0
      • R Rei Miyasaka

        Just curious... has anyone ever bothered catching it?

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        Yes, it does not always signify what the name implies. Have a look at Image.FromFile() :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.


        R 1 Reply Last reply
        0
        • L Luc Pattyn

          Yes, it does not always signify what the name implies. Have a look at Image.FromFile() :)

          Luc Pattyn [Forum Guidelines] [My Articles]


          This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.


          R Offline
          R Offline
          Rei Miyasaka
          wrote on last edited by
          #4

          If the file does not have a valid image format or if GDI+ does not support the pixel format of the file, this method throws an OutOfMemoryException exception. Uhh.... wow. Gotta love the WinForms team, total hack as always X|

          L 1 Reply Last reply
          0
          • R Rei Miyasaka

            If the file does not have a valid image format or if GDI+ does not support the pixel format of the file, this method throws an OutOfMemoryException exception. Uhh.... wow. Gotta love the WinForms team, total hack as always X|

            L Offline
            L Offline
            led mike
            wrote on last edited by
            #5

            reinux wrote:

            Gotta love the WinForms team, total hack as always

            Then publish your own own base class library that would be so much better than theirs, or shut the fuck up.

            led mike

            R 1 Reply Last reply
            0
            • L led mike

              reinux wrote:

              Gotta love the WinForms team, total hack as always

              Then publish your own own base class library that would be so much better than theirs, or shut the fuck up.

              led mike

              R Offline
              R Offline
              Rei Miyasaka
              wrote on last edited by
              #6

              Wtf is your problem? There's a reason I don't use WinForms anymore, and it's because someone already did publish their own UI toolkit for .NET that's so much better, and it's called WPF.

              L D 2 Replies Last reply
              0
              • R Rei Miyasaka

                Wtf is your problem? There's a reason I don't use WinForms anymore, and it's because someone already did publish their own UI toolkit for .NET that's so much better, and it's called WPF.

                L Offline
                L Offline
                led mike
                wrote on last edited by
                #7

                reinux wrote:

                Wtf is your problem?

                My bad. Confused you with someone else with a similar CP name, I should have checked first. :-O

                led mike

                1 Reply Last reply
                0
                • R Rei Miyasaka

                  Wtf is your problem? There's a reason I don't use WinForms anymore, and it's because someone already did publish their own UI toolkit for .NET that's so much better, and it's called WPF.

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #8

                  reinux wrote:

                  someone already did publish their own UI toolkit for .NET that's so much better, and it's called WPF

                  That's debatable. There's so much functionality missing and it's buggy.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                       2006, 2007

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

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