On Mon, Jul 17, 2017 at 5:43 PM, petern <peter.nichvolo...@gmail.com> wrote:
> Speaking of type string lifetime, what about pointer lifetime management? > > I think you've overlooked the pointer lifetime problem for > sqlite3_result_pointer(C,P,T). This form, unlike the blob form, lacks the > destructor callback for cleanup when SQLite determines the scope of the > last statement using a copy of the pointer value has exited. Your use case > appears to presume that a virtual table is managing the pointer object. > Either that or this mechanism is only otherwise used for global pointer > variables. Is there another way for the host application to be notified > that the last statement using the pointer value has exited scope? FWIW, I had exactly the same thought. W/o a destructor, this new feature seems like it's missing an essential piece, although I'm not sure I understand this new feature correctly. It's just that when I see raw pointers being passed around, with no "lifetime attached", reflexes kick in and make me worry about leaks, accesses to "dead" pointers, etc... --DD PS: That document would be mighty useful Richard :) _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users