Info

此问题已关闭。 请重新打开它进行编辑或回答。

Memory issue with UIGETDIR

1 次查看(过去 30 天)
Matin Kh
Matin Kh 2015-4-29
关闭: MATLAB Answer Bot 2021-8-20
Recently, I have noticed an odd behavior from uigetdir function of MATLAB.
If I have a string with some values, it has almost no effect on the memory.
>> memory
Maximum possible array: 860 MB (9.014e+08 bytes)
Memory available for all arrays: 1287 MB (1.349e+09 bytes)
Memory used by MATLAB: 435 MB (4.557e+08 bytes)
Physical Memory (RAM): 3317 MB (3.478e+09 bytes)
>> folder = 'C:\Users\MrAwesome';
>> memory
Maximum possible array: 860 MB (9.014e+08 bytes) *
Memory available for all arrays: 1289 MB (1.352e+09 bytes) **
Memory used by MATLAB: 434 MB (4.553e+08 bytes)
Physical Memory (RAM): 3317 MB (3.478e+09 bytes)
But if I use uigetdir instead, it drains down a whole lot of memory:
>> folder2 = uigetdir;
>> memory
Maximum possible array: 727 MB (7.628e+08 bytes) *
Memory available for all arrays: 1153 MB (1.208e+09 bytes) **
Memory used by MATLAB: 458 MB (4.806e+08 bytes)
Physical Memory (RAM): 3317 MB (3.478e+09 bytes)
And if I clear these two variables from my memory, it will not release the memory!
I looked it up, and found nothing on this issue anywhere.
First, I would like to know how to use (or what to use instead of) uigetdir effectively?
Second, I would like to know how to free the memory from some functions/variables like this?

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by