Home > Software engineering >  I don't know how to solve the memory leaks, tencent butler is how to release?
I don't know how to solve the memory leaks, tencent butler is how to release?

Time:11-20

Recently wrote a interface procedures, using MFC to write, because involves to the calibration of the camera, so with the help of Matlab support library, written by Matlab library there are colleagues, my side is responsible for calling interface, run out of the result is ok, but in the process of the program runs, find the memory leak problem, various screening after positioning in the calibration based on Matlab is my colleagues wrote library there appears the memory leaks, but after the detailed communication, get reply is Matlab there is no application code memory, also not sure whether use Matlab library functions have application to memory, so can't provide release operation, resulting in the now, the program is running after the memory can't release the problem, and with the increase of the number of operation, the memory will increase continuously, only turn off the entire program memory will return to normal, in the process of testing an unexpected discovery that tencent butler in my program was still running my released that part of memory leaks, so want to ask tencent housekeeper this software such as how to release the third party program application memory, I can I take to solve this situation? And for this invocation of third-party libraries appear memory leaks, the concrete solution? Or is there a Matlab bosses can provide a solution to the problem of the memory leak

CodePudding user response:

For reference only matlab clear memory

CodePudding user response:

The matlab modules are commented out first, if no memory leaks that the module is certainly has a memory leak, if there is memory leak commented that your code has a memory leak, narrowing the scope step by step

CodePudding user response:

Memory leak problem usually run for a long time (days) program is more serious, because of the short running program exits, the system will release the memory,

CodePudding user response:

Matlab do not understand, but your own program memory leaks, third party antivirus software is can't help you release! And also can ensure the normal operation of your application, otherwise the function is one of the holes, if the virus writing can be stronger,

CodePudding user response:

The memory of your own application, tencent housekeeper if cannot analysis, unless the matlab DLL after running out of the new and not release memory can be recycled by similar software,

CodePudding user response:

I feel still want to solve the problem of matlab library of memory leaks, find what tencent housekeeper this curve around a bit large, if your evidence is not allow others to justify, or did you let him call library demo program, will see his own program calls the memory leak,

My own package matlab library, found a lot of case need to free memory,
Such as:
EmxArray_real_T * X;
,,,,,,
EmxDestroyArray_real_T (X);

CodePudding user response:

reference 5 floor ipman reply:
your own memory, apply for tencent housekeeper if cannot analysis, unless the matlab DLL after running out of the new and not release memory can be recycled by similar software,
this is truly the matlab problem, but it is not something new out of no release, after more than a month of continuous optimization and screening, and now the entire superposition of program memory leak problem has been solved, but there is a memory leak has been located, but still have no way to solve, that is called initialization function caused by the memory leak problem, but due to the initialization function call only once, so lead to memory leaks is not serious, but also can use tencent housekeeper software release, such as that part of memory, there is the problem so now we are temporarily not to solve first, later there is solution and try again,

CodePudding user response:

f tiger reference wave response:
I feel still want to solve the problem of matlab library memory leaks, find what tencent housekeeper this curve around a bit large, if your evidence is not allow others to justify, or did you let him call library demo program, will see his own program calls the memory leak,

My own package matlab library, found a lot of case need to free memory,
Such as:
EmxArray_real_T * X;
,,,,,,
EmxDestroyArray_real_T (X);
is now able to determine the matlab problems caused by memory leaks, but also can locate to the function of the problem is the initialization function "function name the Initialize ();" The function, but my colleagues over there said he also don't know how to solve, but as a result of leak is not particularly severe and initialization calls only once, we temporarily not to deal with this problem, you have encountered a similar situation? Do you have any good solution?

CodePudding user response:

refer to the eighth floor. One response:
Quote: refer to the sixth floor tiger bobo response:

I feel still want to solve the problem of matlab library of memory leaks, find what tencent housekeeper this curve around a bit large, if your evidence is not allow others to justify, or did you let him call library demo program, will see his own program calls the memory leak,

My own package matlab library, found a lot of case need to free memory,
Such as:
EmxArray_real_T * X;
,,,,,,
EmxDestroyArray_real_T (X);
is now able to determine the matlab problems caused by memory leaks, but also can locate to the function of the problem is the initialization function "function name the Initialize ();" The function, but my colleagues over there said he also don't know how to solve, but as a result of leak is not particularly severe and initialization calls only once, we temporarily not to deal with this problem, you have encountered a similar situation? Do you have any good solution?


After the function call, end the function call?

For example:
PumpModel_Nlinfit_mFcnInitialize ();
PumpModel_Nlinfit_mFcn ();
PumpModel_Nlinfit_mFcnTerminate ();

CodePudding user response:

Tiger, 9/f,
reference wave response:
Quote: refer to the eighth floor. A person's response:

Quote: refer to the sixth floor tiger bobo response:

I feel still want to solve the problem of matlab library of memory leaks, find what tencent housekeeper this curve around a bit large, if your evidence is not allow others to justify, or did you let him call library demo program, will see his own program calls the memory leak,

My own package matlab library, found a lot of case need to free memory,
Such as:
EmxArray_real_T * X;
,,,,,,
EmxDestroyArray_real_T (X);
is now able to determine the matlab problems caused by memory leaks, but also can locate to the function of the problem is the initialization function "function name the Initialize ();" The function, but my colleagues over there said he also don't know how to solve, but as a result of leak is not particularly severe and initialization calls only once, we temporarily not to deal with this problem, you have encountered a similar situation? Do you have any good solution?


After the function call, end the function call?

For example:
PumpModel_Nlinfit_mFcnInitialize ();
PumpModel_Nlinfit_mFcn ();
PumpModel_Nlinfit_mFcnTerminate ();

end of the last release function (PumpModel_Nlinfit_mFcnTerminate ()) We call the beginning, but instead led to any effect at the start of the superposition problem, actually now think about the root cause of the problem should be no effect caused by the release function,

Because we need each invocation code on this side of the logic functions (PumpModel_Nlinfit_mFcn ()) Before you call again initialization function (PumpModel_Nlinfit_mFcnInitialize ()) If I release function called after each use functions, the next cycle initialization function called again due to system mistake last has released so will once again to apply for the memory, but the truth is the last call release function doesn't have any effect, so will cause continuous application stack of memory, memory leaks will be more and more big, but if we don't call release after applied for a function, then the next time again call application function won't apply for again, but there will be no memory leak superposition, we is by removing the release function (PumpModel_Nlinfit_mFcnTerminate ()) Solution to the problem of lost memory stack,

CodePudding user response:

references to the tenth floor. One response:
Quote: tiger, 9/f, reference wave response:

Quote: refer to the eighth floor. One response:

Quote: refer to the sixth floor tiger bobo response:

I feel still want to solve the problem of matlab library of memory leaks, find what tencent housekeeper this curve around a bit large, if your evidence is not allow others to justify, or did you let him call library demo program, will see his own program calls the memory leak,

My own package matlab library, found a lot of case need to free memory,
Such as:
EmxArray_real_T * X;
,,,,,,
EmxDestroyArray_real_T (X);
is now able to determine the matlab problems caused by memory leaks, but also can locate to the function of the problem is the initialization function "function name the Initialize ();" The function, but my colleagues over there said he also don't know how to solve, but as a result of leak is not particularly severe and initialization calls only once, we temporarily not to deal with this problem, you have encountered a similar situation? nullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related