Re: Is there memory leak in mex programming?
- From: Steve Eddins <Steve.Eddins@xxxxxxxxxxxxx>
- Date: Fri, 30 Nov 2007 07:26:09 -0500
Andrew wrote:
I'll add that Matlab seems to treat the output mxArrays of mex function as temporary variables. Say if you have a function:
X = MyMexFun();
If you check the memory address stored in plhs[0] it will not be the same memory address as X. So X, or in your case a(:,i), gets a copy of plhs[0] and then plhs[0] is destroyed.
The data in the array is not actually copied.
--
Steve Eddins
http://blogs.mathworks.com/steve
.
- Follow-Ups:
- Re: Is there memory leak in mex programming?
- From: Andrew
- Re: Is there memory leak in mex programming?
- From: Bruno Luong
- Re: Is there memory leak in mex programming?
- References:
- Is there memory leak in mex programming?
- From: Jerry
- Re: Is there memory leak in mex programming?
- From: Andrew
- Is there memory leak in mex programming?
- Prev by Date: compiling mcc generated files
- Next by Date: Re: compiling mcc generated files
- Previous by thread: Re: Is there memory leak in mex programming?
- Next by thread: Re: Is there memory leak in mex programming?
- Index(es):
Relevant Pages
|