Code covered by the BSD License  

Highlights from
Pointers Toolbox

from Pointers Toolbox by Ben Petschel
basic functions to work with pointer variables and dynamic data types

x=mfree(ptr)
function x=mfree(ptr)
% ptr/mfree: free up the space assigned to a variable
% usage:     mfree(ptr)
%        x = mfree(ptr)
%
% mfree frees the slot in virtual memory that is used by ptr, and
% optionally returns the value x that occupied it.
% 
%
% See also: mread, mwrite, malloc, mfree

% Author: Ben Petschel 31/8/2009
% Version History:
%   31/8/2009 - initial release

if nargout==0
  mmgr(4,ptr);
else
  x = mmgr(4,ptr);
end;

Contact us at files@mathworks.com