T O P I C R E V I E W |
HeartWare |
Posted - Mar 09 2022 : 01:51:23 I have trouble re-using a globally allocated TImageEnIO / TImageEnProc (no, not multi-threaded).
I want to use the same instance but operate on different TBitMap/TIEBitMap/TImageEn/TImage, so I assign the IO's AttachedBitmap etc. to the one I want to work on now.
But I run into access violations in TIEBitMap.FreeImage, which gets called with a NIL instance (Stack Trace: TImageEnIO.SetAttachedBitmap -> TIEBitmap.EncapsulateTBitmap -> TIEBitmap.FreeImage).
I have tried setting the various "AttachedXXX" properties to NIL (to "clear" it) before assigning the AttachedBitmap, but that doesn't work either (in some cases, I even get an error when I set one of these to NIL).
What is the proper procedure to use the same TImageEnIO for different use cases (different AttachedXXX)? |
3 L A T E S T R E P L I E S (Newest First) |
xequte |
Posted - Mar 23 2022 : 16:36:24 Hi
It should be enough just to assign a new object to AttachedXXX. If you see otherwise, let us know and we will test for that combination. There are some edge cases that may have an undocumented effect such as attaching a TIEBitmap after attaching a TBitmap.
Our recommendation would be not to reuse TImageEnIO or TImageEnProc at all. There would be negligible performance benefits to it. Just create them as needed.
Nigel Xequte Software www.imageen.com
|
HeartWare |
Posted - Mar 23 2022 : 09:13:01 What is the proper procedure to re-use a TImageEnIO / TImageEnProc? Should I disable all the AttachedXXX before assigning the correct one, or is an implicit disable of all other AttachedXXX done within a new assignment to any AttachedXXX property? |
xequte |
Posted - Mar 09 2022 : 22:15:23 Hi
This is fixed in v10.3.5, next week.
Nigel Xequte Software www.imageen.com
|