![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Recovering Memory allocated to sub-buffers Topic Summary: e.g. textSubString = textString[(end 0)+2:] Created On: 27-Nov-2006 17:50 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I recall at some point in the past being told how to recover memory allocated to temporary buffers, but seem to have lost my notes. This occurs in situations where you are extracting a portion of a buffer. There is an intermediary buffer created that is not freed. But there is some way to get a handle on the intermediary buffer and delete it. Does anyone know how to do this?
Here is example code that I believe triggers this situation: textSubString = textString[(end 0)+2:] Thanks! ------------------------- Shawn Stepper shawn.e.stepper@wellsfargo.com |
|
![]() |
|
![]() |
|
I don't understand 'temporary buffer'; all buffers are 'temporary' in the sense that the memory is free up when you delete(Buffer).
I suspect you are asking about the 'tempStringOf(Buffer)' command, which extracts a string from a buffer without putting that string in the internal 'string table', the prime cause of Memory Leak. The string retrieved with tempStringOf is actually just a pointer to that spot in the buffer. If you assign that to a variable you are effectively just making an alias of the variable to that spot in the buffer. Use tempStringOf(Buffer) when the results are going somewhere permantly, such as to an attribute value, printed, or sent to a file. - Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Recovering Memory allocated to sub-buffers
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.