octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #62459] Severe memory leak when functions are


From: Rik
Subject: [Octave-bug-tracker] [bug #62459] Severe memory leak when functions are nested
Date: Mon, 16 May 2022 18:13:42 -0400 (EDT)

Follow-up Comment #7, bug #62459 (project octave):

I also tested using a nested function but avoiding the anonymous function like
so


function retval = leak_main_fcn (p)
  R = p*rand(1);

  function retval = leak_nested_fcn (M)

    retval  = leak_sub_fcn (M) ;
  endfunction

  retval = leak_nested_fcn (R);

endfunction

function retval = leak_sub_fcn (M)
  retval  = 1 ./ M;
endfunction


and this also works just fine.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62459>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]