Re: [fpc-pascal] Current TThread

2010-12-21 Thread Helmut Hartl
Am 21.12.10 13:47, schrieb Mattias Gaertner: On Tue, 21 Dec 2010 14:29:36 +0100 (CET) michael.vancann...@wisa.be wrote: You could use GetCurrentThreadID and a lookup list. What about using a threadvar CurrentThread: Thread; ? TThread could set this in the constructor. We currently use this

Re: [fpc-pascal] Current TThread

2010-12-21 Thread Jonas Maebe
On 21 Dec 2010, at 14:59, michael.vancann...@wisa.be wrote: On Tue, 21 Dec 2010, Mattias Gaertner wrote: What about using a threadvar CurrentThread: Thread; ? TThread could set this in the constructor. This could be done, but will give errors for externally created threads. And for th

Re: [fpc-pascal] Current TThread

2010-12-21 Thread michael . vancanneyt
On Tue, 21 Dec 2010, Mattias Gaertner wrote: On Tue, 21 Dec 2010 14:29:36 +0100 (CET) michael.vancann...@wisa.be wrote: On Tue, 21 Dec 2010, Mattias Gaertner wrote: Hi, How to get the current TThread instance? There is no documented method. Strange. Am I really the first needing thi

Re: [fpc-pascal] Current TThread

2010-12-21 Thread Mattias Gaertner
On Tue, 21 Dec 2010 14:29:36 +0100 (CET) michael.vancann...@wisa.be wrote: > > > On Tue, 21 Dec 2010, Mattias Gaertner wrote: > > > Hi, > > > > How to get the current TThread instance? > > There is no documented method. Strange. Am I really the first needing this? > > For example: I created

Re: [fpc-pascal] Current TThread

2010-12-21 Thread michael . vancanneyt
On Tue, 21 Dec 2010, Mattias Gaertner wrote: Hi, How to get the current TThread instance? There is no documented method. For example: I created a TThread and called a function, which calls a function One of those sub functions needs to call TThread.Synchronize, which needs as parame

[fpc-pascal] Current TThread

2010-12-21 Thread Mattias Gaertner
Hi, How to get the current TThread instance? For example: I created a TThread and called a function, which calls a function One of those sub functions needs to call TThread.Synchronize, which needs as parameter the current TThread. Mattias ___ fp

[fpc-pascal] Re: Firebird 2.5 embedded bug? Debugging skills needed

2010-12-21 Thread Jim
On 20-12-2010 18:23, Jim wrote: > (Posted to Firebird-dev list, copied to freepascal list for info) > > Hi all, > > Recently I mentioned a problem running FreePascal 64 bit code with > Firebird 2.5 embedded 64 bit on Windows (Vista). > All these cases seem to lead to access violations (or other

[fpc-pascal] Re: Need help fixing leaks

2010-12-21 Thread leledumbo
> At least one issue seems to be that all your TFPGObjectLists are owners of > their respective instances. This leads to multiple attempted Free() calls > to the objects in the list. If I am correct, there are/will be up to three > Free() calls for some objects in your example code. > I may be wr

Re: [fpc-pascal] Need help fixing leaks

2010-12-21 Thread Thomas Schatzl
Hi, On Mon, 20 Dec 2010 19:33:51 -0800 (PST), leledumbo wrote: > [...] > Program received signal SIGSEGV, Segmentation fault. > 0x in ?? () > (gdb) bt > #0 0x in ?? () > #1 0x00406c32 in SYSTEM_TOBJECT_$__FREE () > #2 0x0040d916 in TFPGOBJECTLIST$TLLVMVALUE__DEREF (ITEM=0x55138