<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/112441/memory-leak-in-mdltext_getelementdescr</link><description>I convert a lot of text with mdlText_getElementDescr: 
 status=mdlText_getElementDescr (&amp;amp;edPText, &amp;amp;edP-&amp;gt;el.text_2d, NULL); 
 if (status == SUCCESS) 
 { 
 // do nothing mdlElmdscr_freeAll(&amp;amp;edPText); 
 } 
 Used Memory grows over the time. Is there really</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343397?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 13:14:49 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:1b4a2dc7-d4c8-4490-bb15-3fa1b38c93f8</guid><dc:creator>Thomas Haberstroh</dc:creator><description>Hi Stefan, Jon &amp;amp; Jan,&lt;br /&gt;
thank you for help!!!&lt;br /&gt;
Regards, Tom&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343394?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 13:02:00 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:433002a1-db2f-46da-b3f2-604f091cf91f</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;[quote user=&amp;quot;stefan_bernsdorf&amp;quot;]but those @TTF fonts (whatever this @ sign means...)[/quote]&lt;/p&gt;
&lt;p&gt;I found only this information in MicroStation help: For vertical text in Asian languages, select a vertical font (a font&amp;acute;s whose names begin with &amp;ldquo;@&amp;rdquo;).&lt;/p&gt;
&lt;p&gt;So it seems selected fonts (with &amp;quot;vertical feature&amp;quot;) are displayed with the sign @, but I guess these fonts should not be used in languages using Latin characters.&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343391?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 12:51:02 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4f332524-e65f-4ca1-be3e-7903fe953270</guid><dc:creator>Jon Summers</dc:creator><description>&lt;p&gt;[quote user=&amp;quot;Thomas Haberstroh&amp;quot;]&lt;/p&gt;
&lt;pre class="brush: cpp; fontsize: 100; first-line: 1; "&gt;mdlElmdscr_read(&amp;amp;edP, elmAdr[i], ref, FALSE, NULL);
type=mdlElement_getType(&amp;amp;edP-&amp;gt;el);
if (type == TEXT_ELM)
{
   mdlText_getElementDescr(&amp;amp;edPText, &amp;amp;edP-&amp;gt;el.text_2d, NULL);
   ...
}&lt;/pre&gt;
&lt;p&gt;[/quote]&lt;/p&gt;
&lt;p&gt;I&amp;#39;m suspicious of that code:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Why do you get a descriptor, then create a new descriptor from the &lt;span style="font-family:courier new,courier;"&gt;text_2d&lt;/span&gt; component of that descriptor?&lt;/li&gt;
&lt;li&gt;You tested the original descriptor, and you know it&amp;#39;s a&amp;nbsp; text element&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:courier new,courier;"&gt;mdlText_getElementDescr&lt;/span&gt; is a curious function, because it works only in 2D, and there&amp;#39;s no 3D equivalent. It makes your code unusable in a 3D model. The text API has changed substantially during the lifetime of MicroStation&amp;nbsp;V8, and it may be that that function no longer works properly.&amp;nbsp; However, only a Bentley person can tell us definitively.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343389?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 12:47:37 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:65f8b017-62d7-4f9a-be7e-42cce0bd07e6</guid><dc:creator>stefan_bernsdorf</dc:creator><description>Confirmed. Function is leaking for certain fonts. Not TTF in general but those @TTF fonts (whatever this @ sign means...).&lt;br /&gt;
Stefan.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343379?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 11:35:43 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:dccc5d6f-fc7b-4da0-82a4-f0a1c518ede6</guid><dc:creator>Thomas Haberstroh</dc:creator><description>&lt;p&gt;&lt;a href="https://communities.bentley.com/cfs-file/__key/communityserver-discussions-components-files/343173/test2.dgn"&gt;communities.bentley.com/.../test2.dgn&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343378?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 11:34:45 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:92e8c481-445a-41e6-8303-549ebc6072b3</guid><dc:creator>Thomas Haberstroh</dc:creator><description>Dont know, why its not inserted...&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343377?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 11:33:56 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ef5e7287-04ac-4803-82d9-176c581d5c34</guid><dc:creator>Thomas Haberstroh</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;/p&gt;
&lt;p&gt;here is a file&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards, Tom&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343376?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 11:27:51 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ccfc0dcf-08b3-4ac2-b972-b51ed305d62d</guid><dc:creator>stefan_bernsdorf</dc:creator><description>Sry Tom,&lt;br /&gt;
not leaking for me. Zero K for 20.000 text elements.&lt;br /&gt;
Can you send your file, or at least a sample containing malicious text?&lt;br /&gt;
Best, Stefan.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343358?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 09:05:28 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:de7a08c7-7482-4524-9e57-a7eb23a32048</guid><dc:creator>Thomas Haberstroh</dc:creator><description>Hi Stefan,&lt;br /&gt;
yes, thats better. But the code is leaking, too - unfortunatily&lt;br /&gt;
&lt;br /&gt;
Regards, Tom&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343354?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 08:51:25 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4cb4b80c-f450-4f7e-a6aa-c9fc440090eb</guid><dc:creator>stefan_bernsdorf</dc:creator><description>Hi Tom,&lt;br /&gt;
just to be accurate: &lt;br /&gt;
&lt;br /&gt;
if (mdlText_getElementDescr(&amp;amp;edPText, &amp;amp;edP-&amp;gt;el.text_2d, NULL)==SUCCESS) {&lt;br /&gt;
   mdlElmdscr_freeAll(&amp;amp;edPText);&lt;br /&gt;
}&lt;br /&gt;
mdlElmdscr_freeAll(&amp;amp;edP); &lt;br /&gt;
&lt;br /&gt;
Did not compile your example. &lt;br /&gt;
Is your demo code leaking, too? &lt;br /&gt;
&lt;br /&gt;
Best, Stefan.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343347?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 07:15:11 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:103c4fb6-255e-4f97-9d21-c5e26211e567</guid><dc:creator>Thomas Haberstroh</dc:creator><description>Hi Jan,&lt;br /&gt;
OK - thank you for help / hints and that you spend your time for me!&lt;br /&gt;
&lt;br /&gt;
Best regards&lt;br /&gt;
Tom&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343346?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 07:10:23 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:0380fff5-222d-4245-9ea4-a9ddb5752287</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Tom,&lt;/p&gt;
&lt;p&gt;[quote user=&amp;quot;Thomas Haberstroh&amp;quot;]here is the code[/quote]&lt;/p&gt;
&lt;p&gt;Thanks! Right now I have no idea what is wrong, but let&amp;#39;s hope somebody else will have an idea.&lt;/p&gt;
&lt;p&gt;Can you please edit your post and to use Syntaxhighlighter (yellow pencil icon in Advanced Editor mode) and set the language to C++, so you code will be displayed not as ugly plain text but as the real code?&lt;/p&gt;
&lt;p&gt;[quote user=&amp;quot;Thomas Haberstroh&amp;quot;]The effect is only with true type text.[/quote]&lt;/p&gt;
&lt;p&gt;This is weird.&lt;/p&gt;
&lt;p&gt;But some information still missing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What version of MicroStation do you use? BTW It would be nice to follow &lt;a target="_blank" href="/products/programming/microstation_programming/f/343173/t/77384"&gt;Programmin Forum best practices&lt;/a&gt; and to mention main branch in Question subject and exact MicroStation build in the first post.&lt;/li&gt;
&lt;li&gt;Is memory decreased (freed) after the design file is closed or it remains allocated until MicroStation is closed?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;[quote user=&amp;quot;Thomas Haberstroh&amp;quot;]I started with mdl over 20 years ago[/quote]&lt;/p&gt;
&lt;p&gt;I understand, but it&amp;#39;s not good. In such case I would still use assembler for 8bit processors and Pascal ;-)&lt;/p&gt;
&lt;p&gt;[quote user=&amp;quot;Thomas Haberstroh&amp;quot;]...and it runs[/quote]&lt;/p&gt;
&lt;p&gt;Will not anymore pretty soon. MicroStation CONNECT Edition doesn&amp;#39;t support pseudocode applications, so you will have to migrate your code to native MDL anyway and it&amp;#39;s for sure better to migrate pseudocode app to native code at first in MicroStation V8&lt;em&gt;i&lt;/em&gt; and in the next step to migrate working native code to CONNECT Edition than to try to solve both tasks at the same time ... in such case maybe it&amp;#39;s easier to write the application from scratch.&lt;/p&gt;
&lt;p&gt;And even in V8&lt;em&gt;i&lt;/em&gt; it&amp;#39;s not only recommended, but also better to use native C/C++ code, because of more standard programming environment and also an access to new MicroStationAPI that provides some extra features compring to C MDL API.&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343341?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 06:48:16 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:d6f2b806-0083-4776-a053-58b12d710f09</guid><dc:creator>Thomas Haberstroh</dc:creator><description>Hi Jan,&lt;br /&gt;
here is the code, directly called from main. I&amp;#39;ve placed 7000 texts &amp;#39;hallo tom&amp;#39;. The effect is only with true type text.&lt;br /&gt;
&lt;br /&gt;
    scP = mdlScanCriteria_create ();&lt;br /&gt;
	mdlScanCriteria_setModel (scP,ref);&lt;br /&gt;
	mdlScanCriteria_setReturnType (scP,MSSCANCRIT_RETURN_FILEPOS ,FALSE,TRUE);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	do&lt;br /&gt;
	{&lt;br /&gt;
		scanWords = sizeof(elmAdr)/sizeof(short);&lt;br /&gt;
		status = mdlScanCriteria_scan (scP,elmAdr, &amp;amp;scanWords,&amp;amp;filePos);&lt;br /&gt;
&lt;br /&gt;
		numAdr = scanWords/sizeof(short);&lt;br /&gt;
&lt;br /&gt;
		for (i=0;i&amp;lt;numAdr ;i++ )&lt;br /&gt;
		{&lt;br /&gt;
		   filepos = elmAdr[i];&lt;br /&gt;
		   startFilepos = filepos;&lt;br /&gt;
		   mdlElmdscr_read(&amp;amp;edP, elmAdr[i], ref, FALSE, NULL);&lt;br /&gt;
		   type=mdlElement_getType(&amp;amp;edP-&amp;gt;el);&lt;br /&gt;
		   if (type == TEXT_ELM)&lt;br /&gt;
		   {&lt;br /&gt;
			   mdlText_getElementDescr(&amp;amp;edPText, &amp;amp;edP-&amp;gt;el.text_2d, NULL);&lt;br /&gt;
			   mdlElmdscr_freeAll(&amp;amp;edP);&lt;br /&gt;
			   mdlElmdscr_freeAll(&amp;amp;edPText);&lt;br /&gt;
		   }&lt;br /&gt;
	    }&lt;br /&gt;
	} while (status == BUFF_FULL);&lt;br /&gt;
	mdlScanCriteria_free (scP);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With regards&lt;br /&gt;
Tom&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343337?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 06:23:24 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:234b7b36-947e-441a-b9e0-33ef2ed7d34a</guid><dc:creator>Thomas Haberstroh</dc:creator><description>Hi Jan,&lt;br /&gt;
ok, I will build a minimum example. Let me a couple of minutes.&lt;br /&gt;
&lt;br /&gt;
I started with mdl over 20 years ago and there ist a lot of technology to use...and it runs&lt;br /&gt;
&lt;br /&gt;
With regards&lt;br /&gt;
Tom&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343335?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 06:15:44 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:77adb22b-5992-4b69-a53e-9c3164f37181</guid><dc:creator>Jan Šlegr</dc:creator><description>Hi Thomas,&lt;br /&gt;
&lt;br /&gt;
to hunt memory leaks is always disagreeable job. It&amp;#39;s not clear what is &amp;quot;around&amp;quot; the code you posted and I am not fully convinced the problem is in these functions. Do you think it&amp;#39;s possible to extract a bit more code including part where you manipulate with elements?&lt;br /&gt;
&lt;br /&gt;
Another questions is what doeas it mean exactly &amp;quot;Used Memory grows over the time.&amp;quot;? If you modified a lot of elements, I guess some memory usage grow is because of undo buffer.&lt;br /&gt;
&lt;br /&gt;
For curiosity only, not directly related to discussed issue (but native code can behave differently): Why do you use old pseudocode MDL that has been marked as obsolete and &amp;quot;don&amp;#39;t use it&amp;#39; about 14 years ago? Is it because of some very old MicroStation version?&lt;br /&gt;
&lt;br /&gt;
With regards,&lt;br /&gt;
&lt;br /&gt;
  Jan&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343332?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 06:03:49 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:be89a2b4-4f2a-4440-a760-97ca7f675bc2</guid><dc:creator>Thomas Haberstroh</dc:creator><description>OK - nice. I used the first variant in the last 20 years. So ists not the reason for the problem. But thanx.&lt;br /&gt;
Regards Tom&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343287?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2015 21:26:01 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:87bed0c4-fb11-4d7f-8fe3-bf3c85a7a32a</guid><dc:creator>Jon Summers</dc:creator><description>&lt;p&gt;[quote user=&amp;quot;Thomas Haberstroh&amp;quot;]It is from model scan.But why it should not freed?[/quote]&lt;/p&gt;
&lt;p&gt;Whether it should or should not be freed depends on how you write your scan.&amp;nbsp; If you explicitly read the element descriptor in your scan code, then the descriptor is yours to free.&amp;nbsp; If, on the other hand, you use an element descriptor provided by a scan callback function, then the descriptor is not yours to free.&lt;/p&gt;
&lt;p&gt;Example (from MDL help) of reading an element descriptor yourself:&lt;/p&gt;
&lt;pre class="brush: cpp; fontsize: 100; first-line: 1; "&gt;do
{
  scanSize = sizeof (scanBuf) / sizeof (short);
  scanStatus = mdlScanCriteria_scan (oscP,scanBuf,&amp;amp;scanSize,&amp;amp;scanPosition);
  for (lP = scanBuf; lP &amp;lt; scanBuf + scanSize / 2; ++lP)
  {
    MSElementDescr  *edP;
    if (mdlElmdscr_readToMaster (&amp;amp;edP, *lP, mdlModelRef_getActive(), FALSE, NULL))
    {
      ...
      mdlElmdscr_freeAll (&amp;amp;edP);
    }

  }
} while (scanStatus == BUFF_FULL);&lt;/pre&gt;
&lt;p&gt;Example of scan callback:&lt;/p&gt;
&lt;pre class="brush: cpp; fontsize: 100; first-line: 1; "&gt;//  In your scan function
mdlScanCriteria_setElmDscrCallback (pScanCrit, (PFScanElemDscrCallback)writeWorkFunc, (void*)cpArgms);
mdlScanCriteria_scan (pScanCrit, NULL, NULL,NULL);
&lt;/pre&gt;
&lt;p&gt;The scan callback function:&lt;/p&gt;
&lt;pre class="brush: cpp; fontsize: 100; first-line: 1; "&gt;int             writeWorkFunc
(
MSElementDescr* edP,     /*  =&amp;gt;  This descriptor is not yours (should be MSElementDescr const* edP) */
void*           args,
ScanCriteria*   scP
)
{
    MSElementDescr  *newDescrP = NULL;
    /*  Here&amp;#39;s how to obtain a descriptor that belongs to you */
    mdlElmdscr_duplicate (&amp;amp;newDescrP,edP);
    /*  Do something with duplicate descriptor */
    mdlElmdscr_freeAll (&amp;amp;newDescrP);
    /*  But don&amp;#39;t free edP */
    return  SUCCESS;
}&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343269?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2015 17:01:44 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:62bbcab9-8e43-4be6-a80d-629d8ed70e33</guid><dc:creator>Thomas Haberstroh</dc:creator><description>Yes, it is from model scan.But why it should not freed? Is that concerned with memory usage of mdlText_getElementDescr?&lt;br /&gt;
Reagrds, Tom&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343267?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2015 16:54:41 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:77f4f072-6800-49b4-b9a1-5a543e28e0b7</guid><dc:creator>Jon Summers</dc:creator><description>&lt;p&gt;[quote user=&amp;quot;Thomas Haberstroh&amp;quot;]of course edP is freed &lt;br /&gt; [/quote]&lt;/p&gt;
&lt;p&gt;Where does &lt;span style="font-family:courier new,courier;"&gt;edP&lt;/span&gt; originate?&amp;nbsp; If it&amp;#39;s from a model scan, then you should not free it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343266?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2015 16:52:38 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:109195b8-82c6-485f-86d4-6bda1234d40a</guid><dc:creator>Thomas Haberstroh</dc:creator><description>Hi Jon,&lt;br /&gt;
&lt;br /&gt;
ofcourse edP is freed &lt;br /&gt;
&lt;br /&gt;
Regards, Tom&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343263?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2015 16:50:08 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2d7612e3-87c6-4031-8b45-e106d58c0b30</guid><dc:creator>Jon Summers</dc:creator><description>&lt;p&gt;[quote user=&amp;quot;Thomas Haberstroh&amp;quot;]mdlText_getElementDescr (&amp;amp;edPText, &amp;amp;edP-&amp;gt;el.text_2d, NULL)[/quote]&lt;/p&gt;
&lt;p&gt;I see that you frree &lt;span style="font-family:courier new,courier;"&gt;edPText&lt;/span&gt;, but what about &lt;span style="font-family:courier new,courier;"&gt;edP&lt;/span&gt;?&amp;nbsp; If &lt;span style="font-family:courier new,courier;"&gt;edP&lt;/span&gt; is a text element, why not use that descriptor?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343241?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2015 15:08:29 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:78bd2e6c-b6c8-4cad-9b8f-26d0579719fd</guid><dc:creator>Thomas Haberstroh</dc:creator><description>Hi Jan,&lt;br /&gt;
it&amp;#39;s &amp;#39;pure&amp;#39; mdl - bmake...&lt;br /&gt;
&lt;br /&gt;
With regards&lt;br /&gt;
Tom&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343239?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2015 15:05:42 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:c6962d5f-4184-4bcb-bca6-028a5cdda2f4</guid><dc:creator>Jan Šlegr</dc:creator><description>Hi Thomas,&lt;br /&gt;
&lt;br /&gt;
I did not ask for MicroStation version (but it&amp;#39;s valuable too;-) but for C compiler /  Visual Studio version.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
&lt;br /&gt;
  Jan&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343238?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2015 15:03:17 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:9d4e83ce-58dd-48f0-8f97-97e8d4c9592d</guid><dc:creator>Thomas Haberstroh</dc:creator><description>Hi Jan,&lt;br /&gt;
it is V8i SS3. And the text is true type. May be that&amp;#39;s the problem.&lt;br /&gt;
&lt;br /&gt;
Thanx , with regards&lt;br /&gt;
Tom&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory leak in mdlText_getElementDescr?</title><link>https://communities.bentley.com/thread/343213?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2015 13:33:00 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:34888aac-26fa-411c-815d-ae4ea4912348</guid><dc:creator>Jan Šlegr</dc:creator><description>Hi Thomas,&lt;br /&gt;
&lt;br /&gt;
to understand your situation better, what compiler do you use?&lt;br /&gt;
&lt;br /&gt;
With regards,&lt;br /&gt;
&lt;br /&gt;
  Jan&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>