CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

release memory

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 13, 2019, 13:54
Default release memory
  #1
New Member
 
Ontario
Join Date: Sep 2018
Posts: 4
Rep Power: 7
huaji2018 is on a distinguished road
Hello,

When I use List or labelList to define an array, for example,

List <label> vars(3)

how to release its memory if I do not use it any more?

Hua
huaji2018 is offline   Reply With Quote

Old   June 14, 2019, 15:40
Default
  #2
Senior Member
 
Zeppo's Avatar
 
Sergei
Join Date: Dec 2009
Posts: 261
Rep Power: 21
Zeppo will become famous soon enough
Code:
vars.clear();
should do the trick
https://cpp.openfoam.org/v6/ListI_8H_source.html#l00124
Zeppo is offline   Reply With Quote

Old   June 15, 2019, 06:05
Default
  #3
New Member
 
Ontario
Join Date: Sep 2018
Posts: 4
Rep Power: 7
huaji2018 is on a distinguished road
Thank you!
huaji2018 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lenovo C30 memory configuration and discussions with Lenovo matthewe Hardware 3 October 17, 2013 10:23
Openfoam Ubuntu 12.04 Unmet dependencies slls33 OpenFOAM Installation 10 April 9, 2013 04:16
release memory Ema CFX 2 June 30, 2009 17:15
CFX CPU time & real time Nick Strantzias CFX 8 July 23, 2006 17:50


All times are GMT -4. The time now is 04:05.