Garbage collection

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nanda

    #1

    Garbage collection

    hi all,

    In a .NET application, Garbage Collector is invoked, if
    managed heap runs out of memory. What happens if heap
    runs out of memory in an unmanaged application. (when new
    returns null in vc++).


  • Scott M.

    #2
    Re: Garbage collection

    Can't say about VC++, but I would think you'd crash the machine.

    "Nanda" <csenanda@hotma il.com> wrote in message
    news:2f1a01c354 f7$b6294880$a00 1280a@phx.gbl.. .[color=blue]
    > hi all,
    >
    > In a .NET application, Garbage Collector is invoked, if
    > managed heap runs out of memory. What happens if heap
    > runs out of memory in an unmanaged application. (when new
    > returns null in vc++).
    >
    >[/color]


    Comment

    • Scott M.

      #3
      Re: Garbage collection

      Can't say about VC++, but I would think you'd crash the machine.

      "Nanda" <csenanda@hotma il.com> wrote in message
      news:2f1a01c354 f7$b6294880$a00 1280a@phx.gbl.. .[color=blue]
      > hi all,
      >
      > In a .NET application, Garbage Collector is invoked, if
      > managed heap runs out of memory. What happens if heap
      > runs out of memory in an unmanaged application. (when new
      > returns null in vc++).
      >
      >[/color]


      Comment

      • Stu Smith

        #4
        Re: Garbage collection

        I don't think new in C++ ever returns a null pointer. It will raise an
        exception if there's insufficient memory (out_of_memory or something like
        that). And it wouldn't crash the machine, just terminate the application if
        the exception wasn't handled.


        "Scott M." <s-mar@BADSPAMsnet .net> wrote in message
        news:OU2fvMWVDH A.2024@TK2MSFTN GP12.phx.gbl...[color=blue]
        > Can't say about VC++, but I would think you'd crash the machine.
        >
        > "Nanda" <csenanda@hotma il.com> wrote in message
        > news:2f1a01c354 f7$b6294880$a00 1280a@phx.gbl.. .[color=green]
        > > hi all,
        > >
        > > In a .NET application, Garbage Collector is invoked, if
        > > managed heap runs out of memory. What happens if heap
        > > runs out of memory in an unmanaged application. (when new
        > > returns null in vc++).
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Stu Smith

          #5
          Re: Garbage collection

          I don't think new in C++ ever returns a null pointer. It will raise an
          exception if there's insufficient memory (out_of_memory or something like
          that). And it wouldn't crash the machine, just terminate the application if
          the exception wasn't handled.


          "Scott M." <s-mar@BADSPAMsnet .net> wrote in message
          news:OU2fvMWVDH A.2024@TK2MSFTN GP12.phx.gbl...[color=blue]
          > Can't say about VC++, but I would think you'd crash the machine.
          >
          > "Nanda" <csenanda@hotma il.com> wrote in message
          > news:2f1a01c354 f7$b6294880$a00 1280a@phx.gbl.. .[color=green]
          > > hi all,
          > >
          > > In a .NET application, Garbage Collector is invoked, if
          > > managed heap runs out of memory. What happens if heap
          > > runs out of memory in an unmanaged application. (when new
          > > returns null in vc++).
          > >
          > >[/color]
          >
          >[/color]


          Comment

          Working...