List:Connector/C++« Previous MessageNext Message »
From:Christian Koch Date:May 8 2009 6:35am
Subject:Re: Beta out, GA out, ... what is next?
View as plain text  
Uups, I forgot to CC the list :-(

Ulf Wendel schrieb:
> Christian Koch schrieb:
>> Ulf Wendel schrieb:
>>> However, where shall we go from here: what do you want to see in 
>>> 1.1, 1.5, 2.0 or 3.0? What do you need?
>>>
>>
>> What I really would like to see is one of the features already 
>> mentioned in the wiki:
>>
>> "Please consider C++ references for Statements, ResultSets, and 
>> exceptions, instead of pointers to heap memory. Considering the 
>> possible exceptions, it quickly becomes a hassle to ensure that 
>> everything is freed correctly. I think C++ programmers are accustomed 
>> to the compiler doing all of that for them."
>>
>> As C++ doesn't have any garbage collection using pointers to the 
>> Statements, ResultSets,... is very dangerous.
>
> A bit like http://bugs.mysql.com/bug.php?id=44703 ? I'll wait for 
> Lawrin and Andrey to reply. If we need to do API changes, we should 
> make them in the 1.x series.
>

Yes! I wonder wheter e.g. driver->connect() really has to return a 
pointer. In C++ it'a a good practice to use RAII 
(http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization), 
so everything is freed when not needed anymore. If the API has to return 
pointers, some sort of smart-pointers would be fine.

Christian
Thread
Beta out, GA out, ... what is next?Ulf Wendel6 May
  • Re: Beta out, GA out, ... what is next?Christian Koch7 May
    • Re: Beta out, GA out, ... what is next?Ulf Wendel7 May
      • Re: Beta out, GA out, ... what is next?Christian Koch8 May