The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Delphi RTTI Context limitation: not thread safe for method RTTI

Posted by jpluimers on 2019/07/16

In a comment to [WayBack] Update: It was not clear what I was asking so I updated the question. I am trying to call RTTI Invoke from within TTask.Run and I get an AV. I have t… – John Kouraklis – Google+

… you can’t use a TRTTIMethod instance from a TRTTIContext of another thread….

John Kouraklis

+Eric Berger+Panagiotis Drivilas That’s it. Many Thanks

–jeroen

One Response to “Delphi RTTI Context limitation: not thread safe for method RTTI”

  1. Stefan Glienke's avatar

    Stefan Glienke said

    The issue in fact is that the TRttiMethod instance might have been destroyed because the TRttiContext went out of scope and destroyed any TRtti* instances that it owns. This can also happen in single threaded code. If you ensure that the instance stays alive then it works.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.