The problem:
My program handles a single TOracleSession with ThreadSafe property as true. There are few thread running, each localy creates a TOracleQuery object and runs SELECTs on the DB. It seems that when the SQL is executed some memory overlaps (memory areas get overwritten)
More info:
I have a global TThreadList which all the threads use. Each threads first locks the list, then retreives a local pointer to a certain element in the list whereupon it unlocks the list. Each thread later-on uses his pointer to read-only the data in the list element. All is fine until the threads run the TOracleQuery.execute() and then the memory pointed to by the pointers become garbage or inaccessible.
[The SELECTs retreives a considrable amount of data from the DB.]
The question:
I understand that Delphi will never move a TList to different memory locations in the background thus the pointers should point to valid locations all the time. Could it be the TOracleQuery is not thread safe?
My program handles a single TOracleSession with ThreadSafe property as true. There are few thread running, each localy creates a TOracleQuery object and runs SELECTs on the DB. It seems that when the SQL is executed some memory overlaps (memory areas get overwritten)
More info:
I have a global TThreadList which all the threads use. Each threads first locks the list, then retreives a local pointer to a certain element in the list whereupon it unlocks the list. Each thread later-on uses his pointer to read-only the data in the list element. All is fine until the threads run the TOracleQuery.execute() and then the memory pointed to by the pointers become garbage or inaccessible.
[The SELECTs retreives a considrable amount of data from the DB.]
The question:
I understand that Delphi will never move a TList to different memory locations in the background thus the pointers should point to valid locations all the time. Could it be the TOracleQuery is not thread safe?