ios: using the same sqlite parameter more than once causes premature memory deallocation
问题 Note: the question is misleading.. i thought it was using more than one parameter that causes a memory error.. but that's not the reason.. the reason was an incorrectly formed sql statement.. see the answer below. if create an sqlite statement that uses the same parameter more than once ie NSString* updateStmt = @"INSERT INTO search_email(..., subject, ...)" " SELECT ..., :subject, ...," " coalesce((SELECT search_email.threadID " " FROM search_email " " WHERE search_email.subject MATCH