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,781 other followers

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 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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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

 
%d bloggers like this: