mex file, matlab crashes #2

I have a mex file, 

i deallocate memory for every thing i use, apart from a
waveform which receive.I allocate space for it through
mxCalloc and doesnot set if free.

the matlab call is [a,b]=my_func(c,d)

the mex file compiles smoothly and the first time i call the
function in matlab, it works smoothly,

but when i call the function again , the workspace goes
blank, though if i type 'a' in command window, i can see the
contents of a, and i can plot the contents of a too, 

now if i plot again, the matlab simply crashes (segment
violation), it says to save ur work and restart matlab, 
as the code runs smoothly first time, i think its not  a
prob of mex file, but there is some problem with memory

Any one with any clue whats going on
im_aneeq (26)
10/18/2007 3:19:52 PM
comp.soft-sys.matlab 211265 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

0 Replies

Similar Articles

[PageSpeed] 53