[quote user="Zhen Li"]The new CONNECT SDK API TextBlock (new method) also crash Microstation when paste large amount of tex[/quote]
Please be more specific! The current information is prettu useless and cannot be used to investigate the issue further.
- What is "large amount of text"? Is it about to create e.g. thousands of characters long single line or thousands of lines of short lines or one line with many different formatting... ? How to test it / duplicate it if such infornation is missing?
- When MicroStation crashes exactly? When ElementHandler is created or the element is added to active model? Do you have e.g. memory dump or stack relevant information?
- What does it mean "paste"? It's the problem Jon noted already in the past, the terminology is not clear (and because we have not seen any really complete code, it's not possible to deduce what does it mean). The text elements are created by your application, so why to use "paste" word?
[quote user="Zhen Li"]I am thinking the reason of crashing Microstation is that a large amount of pointers created during creating text element not being taken care of.[/quote]
Why do you think the large amount of pointers are created in your code? The pointer itself required a minimum amount of memory and the most of pointers in MicroStation API are implemented as counting pointers, which rapidly decrease a threat of memory leakages. And MicroStation is 64bit application, so from normal user perspective there are no memory limits.
With regards,
Jan