Is it possible to automatically delete the mcrCache directory created by a MATLAB Compiled executable after it terminates?

조회 수: 4 (최근 30일)
There should be some option in MATLAB Compiler to direct the created executable to remove all the data (CTF extracted) added during the running of the program.
Essentially, there should a mechanism for the executable to clean up the mcrCache directories after termination.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2025년 3월 17일
편집: MathWorks Support Team 2025년 3월 17일
The ability to automatically clean up the mcrcache is not available in the MATLAB Compiler.
To work around this issue, you can create a small BAT file that can set up the environment, run the exe and then clean up afterwards.
 
@echo off cls set MCR_CACHE_ROOT=C:\Temp Start complete path to your exe pause rm -r C:\Temp\mcrCache7*
Caveat: If you do this though, I think that subsequent runs of your program might take longer to launch because all the files in the CTF will have to be unpacked and recreated, whereas if you left them it wouldn't have to do that all over again.
 
  댓글 수: 1
Image Analyst
Image Analyst 2016년 12월 21일
If you do this though, I think that subsequent runs of your program might take longer to launch because all the files in the CTF will have to be unpacked and recreated, whereas if you left them it wouldn't have to do that all over again.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Application Deployment에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by