Re: [Firebird-devel] GPRE, new API and static pointers

2016-06-17 Thread Dimitry Sibiryakov
17.06.2016 11:05, Dimitry Sibiryakov wrote: >What I've missed this time? Unfortunately, nothing: master branch crashes as well. Pull request with fix created. -- WBR, SD. -- What NetFlow Analyzer can do for y

Re: [Firebird-devel] GPRE, new API and static pointers

2016-06-17 Thread Dimitry Sibiryakov
16.06.2016 18:50, Alex Peshkoff wrote: > This is reference counted object, and it will not be actually deleted as > long as I've found that YRequest doesn't increment reference counter of YAttachment it is linked to. As the result, after disconnect, the pointer become invalid and next call o

Re: [Firebird-devel] GPRE, new API and static pointers

2016-06-16 Thread Dimitry Sibiryakov
16.06.2016 18:50, Alex Peshkoff wrote: > It can't - this is reference counted object. This is what you miss. Oh, I see. Now I must find out why it does crash in my branch. Perhaps, a local pool is used to allocate the object... -- WBR, SD. ---

Re: [Firebird-devel] GPRE, new API and static pointers

2016-06-16 Thread Alex Peshkoff
On 06/16/2016 07:35 PM, Dimitry Sibiryakov wrote: > Hello, All. > > Currently GPRE used to generate code like this: > >> static Firebird::IRequest* >> fb_396 = 0; /* request handle */ >> >> for (int retries = 0; retries < 2; ++retries) >> { >> { >>

[Firebird-devel] GPRE, new API and static pointers

2016-06-16 Thread Dimitry Sibiryakov
Hello, All. Currently GPRE used to generate code like this: > static Firebird::IRequest* >fb_396 = 0;/* request handle */ > > for (int retries = 0; retries < 2; ++retries) > { > { > if (!DB) > DB = fbProvider->attachDatabase(f