Beginner Question

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

    Beginner Question


    Hi,

    What are the differences between -
    1) new and malloc
    2) delete and free ?

    Thanks in advance,
    Rgds,
    Supriya.


  • Martin Buchleitner

    #2
    Re: Beginner Question

    * "Supriya" <supriyadv@hotm ail.com> wrote:
    [color=blue]
    > Hi,
    >
    > What are the differences between -
    > 1) new and malloc
    > 2) delete and free ?[/color]

    Have look at
    <URL:http://www.parashift.c om/c++-faq-lite/freestore-mgmt.html>


    mabu

    --
    Are you Anonymous? Where? ... I don't think so ...

    [ devnull{at}chao sfactory{dot}or g | http://www.chaosfactory.org/ ]

    Comment

    • myName

      #3
      Re: Beginner Question



      Supriya wrote:[color=blue]
      >
      > Hi,
      >
      > What are the differences between -[/color]
      Google and u'll get more info[color=blue]
      > 1) new and malloc[/color]
      new takes care of correct type, and it calls constructor[color=blue]
      > 2) delete and free ?[/color]
      delete is used with new,[color=blue]
      >
      > Thanks in advance,
      > Rgds,
      > Supriya.[/color]

      Comment

      • Supriya

        #4
        Re: Beginner Question


        Thanks for your replies. They were of immense help.

        "Martin Buchleitner" <devnull@chaosf actory.org> wrote in message
        news:408791bd$0 $18702$3b214f66 @aconews.univie .ac.at...[color=blue]
        > * "Supriya" <supriyadv@hotm ail.com> wrote:
        >[color=green]
        > > Hi,
        > >
        > > What are the differences between -
        > > 1) new and malloc
        > > 2) delete and free ?[/color]
        >
        > Have look at
        > <URL:http://www.parashift.c om/c++-faq-lite/freestore-mgmt.html>
        >
        >
        > mabu
        >
        > --
        > Are you Anonymous? Where? ... I don't think so ...
        >
        > [ devnull{at}chao sfactory{dot}or g | http://www.chaosfactory.org/ ][/color]


        Comment

        Working...