Re: Is there memory leak in mex programming?
- From: "Andrew " <awbsmith@xxxxxxxxxxxxxx>
- Date: Fri, 30 Nov 2007 13:46:39 +0000 (UTC)
Sorry, I meant the mxArray is copied rather than its data.
If the data isn't copied in the a(:,i) = MyMexFun() case I
would be impressed though...
Steve Eddins <Steve.Eddins@xxxxxxxxxxxxx> wrote in message
<fiovh0$7sh$1@xxxxxxxxxxxxxxxxxx>...
Andrew wrote:of
I'll add that Matlab seems to treat the output mxArrays
willmex function as temporary variables. Say if you have a
function:
X = MyMexFun();
If you check the memory address stored in plhs[0] it
casenot be the same memory address as X. So X, or in your
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
.
- References:
- Is there memory leak in mex programming?
- From: Jerry
- Re: Is there memory leak in mex programming?
- From: Andrew
- Re: Is there memory leak in mex programming?
- From: Steve Eddins
- Is there memory leak in mex programming?
- Prev by Date: Re: visual basic
- Next by Date: Re: Is the 2D PDE's numerical solution vectors?
- Previous by thread: Re: Is there memory leak in mex programming?
- Next by thread: Is this kind of regression possible?
- Index(es):