Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Garbage collection for Regexp
Topic Summary: Garbage collection for Regexp
Created On: 8-May-2007 20:08
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Joe Sarkic, on Wednesday, May 16, 2007 3:44 PM

Answer:
Thanks for the info.

One way I found around this memory consumption is to use the matches function instead of Regexp. You sacrifice performance, yet it is still within acceptable bounds. The code that I submitted in the original message would now look like the attached code.
 8-May-2007 20:08
User is offline View Users Profile Print this message


Joe Sarkic

Posts: 31
Joined: 13-Jun-2005

I use regular expressions, on a frequent basis, and have noticed that these expressions do not release allocated memory when run in code that is managed by dialog boxes.

I wrote an extreme example to illustrate this point. You can run the attached code, with the Windows Task Manager opened, and you will notice memory allocation grows with each press of the Apply button. I expected the regular expression's allocated resources to be released once the testFunction terminated.

Only when you close the dialog box do you release the allocated resources.

Is there an equivalent delete function for Regexp variables?
Report this to a Moderator Report this to a Moderator
 9-May-2007 11:28
User is offline View Users Profile Print this message


Uma Unnikrishnan

Posts: 32
Joined: 7-Aug-2006

Report this to a Moderator Report this to a Moderator
 10-May-2007 19:49
User is offline View Users Profile Print this message


Joe Sarkic

Posts: 31
Joined: 13-Jun-2005

Answer Answer
Thanks for the info.

One way I found around this memory consumption is to use the matches function instead of Regexp. You sacrifice performance, yet it is still within acceptable bounds. The code that I submitted in the original message would now look like the attached code.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 2 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.