List:MySQL++« Previous MessageNext Message »
From:Izzy Date:September 28 2008 10:05am
Subject:Re: Fwd: possible bug
View as plain text  
"Don't use new[] dans delete[] operators, and
> prefer safe containers.", ok but new and delete are also valid c++ operators, and I don't see
why shouldn't I use them? With the arrays I have direct access to
memory location of the array, while
using containers looping with iterators take a precious CPU time. But
this is another thing, programing style and
preferance of using or STL or simple arrays. It should work with both,
but it didn't.

On Fri, Sep 26, 2008 at 9:01 PM, Mickaël Wolff
<mickael.wolff@laposte.net> wrote:
> Jim Graf a écrit :
>>
>> Very simple testing shows that:
>>
>>  mysqlpp::Connection *pCon;
>>  pCon = new mysqlpp::Connection[ 20 ];
>>
>> runs the default Connection constructor, and I might mention, it is
>> perfectly valid c++.
>
> [...]
>>
>>  If there are any issues with creating and maintaining
>> objects in this manner, I am not aware or have forgotten?
>>
>
>  It isn't because it compiles and its grammar is correct that your code will
> run as expected. Some things in C++ are evil, because of backward
> compatibility with the C. Don't use new[] dans delete[] operators, and
> prefer safe containers.
>
> --
> Mickaël Wolff aka Lupus Michaelis
> http://lupusmic.org
>
>
> --
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:    http://lists.mysql.com/plusplus?unsub=1l.com
>
>
Thread
Fwd: possible bugJim Graf26 Sep
  • Re: Fwd: possible bugMickaël Wolff26 Sep
    • Re: Fwd: possible bugIzzy28 Sep
      • Re: Fwd: possible bugMickaël Wolff28 Sep
      • Re: Fwd: possible bugJoel Fielder29 Sep
        • Re: Fwd: possible bugRick Gutleber29 Sep
          • Re: Fwd: possible bugJoseph Artsimovich29 Sep
          • Re: Fwd: possible bugAndrew Sayers29 Sep
          • Re: Fwd: possible bugIzzy29 Sep