Usually the user data is some information you can use to refer to your context. How are you using the userData ? Woudn't keeping a reference to your userData and freeing it at DB closing time be enough?
On 24/08/06, David Crawshaw <[EMAIL PROTECTED]> wrote:
I wish to clean up the memory block pUserData passed to create_function() when the function is removed, but I cannot find a way to get a reference to it. The consistent solution would be passing a destructor to create_function, but this involves an interface change. So if there is no other solution, I would like to create: int sqlite3_user_data_find( sqlite3 *db, const char *zFunctionName, int nArg, int eTextRep, void **pUserData ); int sqlite3_user_data_find16(...) I think they need a return code as the *16() version needs to malloc() a UTF8 string to pass to sqlite3FindFunction(), so there's a chance at SQLITE_NOMEM. Would such a patch be accepted? d ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------
----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

