New lookup feature in 1.6 lazarus / 16-Databases ---------------------------------------------------------------------- mangakissa · 2016-03-13 20:55 I have a strange behaviour with lazarus 1.6 I have some lookup combobox on a form. Normally the tables, used in lookup dataset, has to be closed manually. I call my lookup datamodule in formcreate and freed it in onclose. But when I close the form, first all tables in lookupdatamodule are closed and released the lookup datamodule, then procedure onclose will be called and tries to release my lookup datamodule again. Is this normal behaviour of 1.6 (new feature)? ---------------------------------------------------------------------- rvk · 2016-03-13 21:05 Quote from: mangakissa on March 13, 2016, 09:55:41 pmI call my lookup datamodule in formcreate and freed it in onclose. If you create the lookup-datamodule in FormCreate, why don't you free it in FormDestroy. Form-OnClose seems a bit premature. Also... how did you create the datamodule? Did you give it an Owner in the Create(AOwner)? If so, you shouldn't destroy it manually but let the TForm destroy it. Only if you did Create(nil) you can (read "should") destroy it yourself in code.