Re: [fpc-pascal] sqldb create/free lifetime of object

2017-04-12 Thread Sven Barth via fpc-pascal
Am 12.04.2017 14:32 schrieb : > In a way, this is a form of garbage collection or RAII sort of. And reduces the obnoxious free's required in non garbage collected programming languages... So it's a nice feature/trick to have ownership. But at the same time you can think there is a memory leak since

Re: [fpc-pascal] sqldb create/free lifetime of object

2017-04-12 Thread Michael Van Canneyt
On Wed, 12 Apr 2017, nore...@z505.com wrote: On 2017-04-12 05:03, LacaK wrote: Yes, example should be adjusted. Please report bug to not forget. Thanks -Laco. It is not a bug, I just wanted to clarify the magic going on behind the scenes - which, is "ownership". That's all I needed to k

Re: [fpc-pascal] sqldb create/free lifetime of object

2017-04-12 Thread noreply
On 2017-04-12 05:03, LacaK wrote: Yes, example should be adjusted. Please report bug to not forget. Thanks -Laco. It is not a bug, I just wanted to clarify the magic going on behind the scenes - which, is "ownership". That's all I needed to know. The key to seeing this trick/magic is in th

Re: [fpc-pascal] sqldb create/free lifetime of object

2017-04-12 Thread LacaK
Yes, example should be adjusted. Please report bug to not forget. The example is correct. All objects are freed. No need for a bugreport. Yes, correct. -Laco. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/c

Re: [fpc-pascal] sqldb create/free lifetime of object

2017-04-12 Thread Michael Van Canneyt
On Wed, 12 Apr 2017, LacaK wrote: Yes, example should be adjusted. Please report bug to not forget. The example is correct. All objects are freed. No need for a bugreport. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http:/

Re: [fpc-pascal] sqldb create/free lifetime of object

2017-04-12 Thread Michael Van Canneyt
On Wed, 12 Apr 2017, Lars wrote: The sql query object and transaction object are created but not freed: http://www.freepascal.org/docs-html/fcl/sqldb/usingsqldb.html I think the docs should mention that the objects need not to be freed, as this violates normal programming practice of freeing

Re: [fpc-pascal] sqldb create/free lifetime of object

2017-04-12 Thread LacaK
Yes, example should be adjusted. Please report bug to not forget. Thanks -Laco. The sql query object and transaction object are created but not freed: http://www.freepascal.org/docs-html/fcl/sqldb/usingsqldb.html I think the docs should mention that the objects need not to be freed, as this vi

[fpc-pascal] sqldb create/free lifetime of object

2017-04-12 Thread Lars
The sql query object and transaction object are created but not freed: http://www.freepascal.org/docs-html/fcl/sqldb/usingsqldb.html I think the docs should mention that the objects need not to be freed, as this violates normal programming practice of freeing all objects you create. P.s. how is