Re: [fpc-pascal] Get TMethod from function reference

2022-09-15 Thread Hairy Pixels via fpc-pascal
> On Sep 11, 2022, at 3:28 PM, Ondrej Pokorny via fpc-pascal > wrote: > > You should be able to get the Invoke procedure pointer from the RTTI. Sorry Sven mentioned this I must have glossed over it. So yes I am storing the function reference in a class so it’s not going to get freed. Given

Re: [fpc-pascal] Get TMethod from function reference

2022-09-15 Thread Sven Barth via fpc-pascal
Am 15.09.2022 um 15:30 schrieb Hairy Pixels: On Sep 15, 2022, at 12:28 PM, Sven Barth wrote: As mentioned elsewhere function references are in fact interfaces. And you can't retrieve a method pointer to a interface function, cause relying on that would result in either memory leaks or prema

Re: [fpc-pascal] Get TMethod from function reference

2022-09-15 Thread Hairy Pixels via fpc-pascal
> On Sep 15, 2022, at 12:28 PM, Sven Barth wrote: > > As mentioned elsewhere function references are in fact interfaces. And you > can't retrieve a method pointer to a interface function, cause relying on > that would result in either memory leaks or premature release of the > interface, bec