Re: when to use "new"
From: Gernot Frisch (Me_at_Privacy.net)
Date: 11/15/04
- Next message: Jason Heyes: "Re: when to use "new""
- Previous message: John Thingstad: "Re: C++ sucks for games"
- In reply to: Sam: "Re: when to use "new""
- Next in thread: Sam: "Re: when to use "new""
- Reply: Sam: "Re: when to use "new""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 15 Nov 2004 10:14:15 +0100
<snip>
> Now we get a problem. You can write the following Java codes:
> Polynomial createNew() {
> return new Polynomial();
> }
<snap>
Why does one want to do this:
Polynomial* p1 = OtherPoly.createNew();
instead of:
Polynomial p1 = OtherPoly;
??
I've never programmed much Java so I don't get the idea here. I think
you don't have to new/delete at all if you're from java world. If you
use container classes you have all the java functionality without
caring about new/delete. Correct me if I'm wrong.
-Gernot
- Next message: Jason Heyes: "Re: when to use "new""
- Previous message: John Thingstad: "Re: C++ sucks for games"
- In reply to: Sam: "Re: when to use "new""
- Next in thread: Sam: "Re: when to use "new""
- Reply: Sam: "Re: when to use "new""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|