I think I found the problem. Can you replace `dispose' in WEL_WINDOW by the following: dispose is -- Free allocated memory. local l_null, l_data: POINTER l_object_id: INTEGER do -- Free memory taken by `internal_data'. l_data := internal_data if l_data /= l_null then l_object_id := {WEL_INTERNAL_DATA}.object_id (l_data) check l_object_id_valid: l_object_id > 0 end eif_object_id_free (l_object_id) -- To mark that area as been freed {WEL_INTERNAL_DATA}.set_object_id (l_data, -1) if item /= l_null then -- The data is not usable anymore so we need to -- remove it from GWLP_USERDATA otherwise bad things -- might happen. cwin_set_window_long (item, gwlp_userdata, l_null) end l_data.memory_free internal_data := l_null end Precursor {WEL_ANY} end Could you confirm it works?