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. Other Discussions
  3. The Weird and The Wonderful
  4. Premature Disposal

Premature Disposal

Scheduled Pinned Locked Moved The Weird and The Wonderful
csharp
9 Posts 7 Posters 29 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
    Rob Grainger
    wrote on last edited by
    #1

    I'm a great fan of shorties. I'll have to miss most of the source for the usual reasons, but the last two lines made me do a double-take... (within class FeedMetaData, C#)virtual FeedMetaData Send(FeedValidationErrorHandler handler) { // ... this.Dispose(); return this; }

    D R B N T 5 Replies Last reply
    0
    • R Rob Grainger

      I'm a great fan of shorties. I'll have to miss most of the source for the usual reasons, but the last two lines made me do a double-take... (within class FeedMetaData, C#)virtual FeedMetaData Send(FeedValidationErrorHandler handler) { // ... this.Dispose(); return this; }

      D Offline
      D Offline
      DavidNohejl
      wrote on last edited by
      #2

      Return value should be FriedMetaData then :P


      [My Blog]
      "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - RĂ¼diger Klaehn
      "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe

      1 Reply Last reply
      0
      • R Rob Grainger

        I'm a great fan of shorties. I'll have to miss most of the source for the usual reasons, but the last two lines made me do a double-take... (within class FeedMetaData, C#)virtual FeedMetaData Send(FeedValidationErrorHandler handler) { // ... this.Dispose(); return this; }

        R Offline
        R Offline
        Rob Grainger
        wrote on last edited by
        #3

        Another shorty, discovered moments after submitting the last, and in the same file. Console.WriteLine(String.Format("{0}", arg)); Again, the actual example is slightly more complex, but I'd guess that there's a redundant call in there somewhere ;)

        P 1 Reply Last reply
        0
        • R Rob Grainger

          Another shorty, discovered moments after submitting the last, and in the same file. Console.WriteLine(String.Format("{0}", arg)); Again, the actual example is slightly more complex, but I'd guess that there's a redundant call in there somewhere ;)

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          Huh... not arg.ToString() ?

          T 1 Reply Last reply
          0
          • R Rob Grainger

            I'm a great fan of shorties. I'll have to miss most of the source for the usual reasons, but the last two lines made me do a double-take... (within class FeedMetaData, C#)virtual FeedMetaData Send(FeedValidationErrorHandler handler) { // ... this.Dispose(); return this; }

            B Offline
            B Offline
            Brady Kelly
            wrote on last edited by
            #5

            I first read that as FeedMeData... :~

            T 1 Reply Last reply
            0
            • B Brady Kelly

              I first read that as FeedMeData... :~

              T Offline
              T Offline
              Thomas R Wolfe
              wrote on last edited by
              #6

              Thank God I wasn't the only one!

              1 Reply Last reply
              0
              • R Rob Grainger

                I'm a great fan of shorties. I'll have to miss most of the source for the usual reasons, but the last two lines made me do a double-take... (within class FeedMetaData, C#)virtual FeedMetaData Send(FeedValidationErrorHandler handler) { // ... this.Dispose(); return this; }

                N Offline
                N Offline
                Nemanja Trifunovic
                wrote on last edited by
                #7

                Just like dangling pointers in C or C++ :)

                Programming Blog utf8-cpp

                1 Reply Last reply
                0
                • R Rob Grainger

                  I'm a great fan of shorties. I'll have to miss most of the source for the usual reasons, but the last two lines made me do a double-take... (within class FeedMetaData, C#)virtual FeedMetaData Send(FeedValidationErrorHandler handler) { // ... this.Dispose(); return this; }

                  T Offline
                  T Offline
                  TheGreatAndPowerfulOz
                  wrote on last edited by
                  #8

                  Is that like Premature Eja....?

                  Silence is the voice of complicity. Strange women lying in ponds distributing swords is no basis for a system of government. -- monty python Might I suggest that the universe was always the size of the cosmos. It is just that at one point the cosmos was the size of a marble. -- Colin Angus Mackay

                  1 Reply Last reply
                  0
                  • P PIEBALDconsult

                    Huh... not arg.ToString() ?

                    T Offline
                    T Offline
                    TheGreatAndPowerfulOz
                    wrote on last edited by
                    #9

                    uh, no, it should be Console.WriteLine("{0}", arg); (The string.format("{0}", arg) is superflous. The reason to use the format specifier is that arg may itself contain formatting directives such as {0}.

                    Silence is the voice of complicity. Strange women lying in ponds distributing swords is no basis for a system of government. -- monty python Might I suggest that the universe was always the size of the cosmos. It is just that at one point the cosmos was the size of a marble. -- Colin Angus Mackay

                    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