a little adjustment: clear sv ( MATLAB)
2017-02-06 17:11
85 查看
original:
function draw_once(sv)
draw_vehicle(sv);
draw_sonic_line(sv);
end
new:
function draw_once(sv)
draw_vehicle(sv);
draw_sonic_line(sv);
clear sv; %%%%%%%%%%%%%%%%%%%%%%% after this added, memory will not increase in the for loop.
end
This test demonstrates that if you do not clear that memory, even after this function is finished, it will not automatically destroy sv to release this memory but keep it.
Very important and puzzling lesson!
function draw_once(sv)
draw_vehicle(sv);
draw_sonic_line(sv);
end
new:
function draw_once(sv)
draw_vehicle(sv);
draw_sonic_line(sv);
clear sv; %%%%%%%%%%%%%%%%%%%%%%% after this added, memory will not increase in the for loop.
end
This test demonstrates that if you do not clear that memory, even after this function is finished, it will not automatically destroy sv to release this memory but keep it.
Very important and puzzling lesson!
相关文章推荐
- matlab中结构体使用方法——littlestonelj
- Matlab 混合编程资源1
- MatLab 画图
- use matlab engine
- matlab绘制实用日历实例代码
- Little things that can make your life easier in 2016
- MATLAB技巧——sort和sortrows函数
- Matlab之print,fprint,fscanf,disp函数
- Matlab 等间隔读取RIENX 气象(m)文件
- 去掉MATLAB编译产生的可执行图形界面程序运行时的DOS黑窗口的一种方法
- [Software] Saliency Map Algorithm : MATLAB Source Code
- matlab中imresize
- Minimum Adjustment Cost
- Matlab的logo是怎么来的? L形区域上的波动方程的解
- matlab求解二元一次方程解得表达式
- windows系统下配置caffe的matlab接口所遇到的问题
- matlab简单画图功能用到的命令
- “big-endian”和“little-endian”的三种参考处理方式
- MATLAB图像处理工具箱
- Matlab中Latent SVM model参数含义