Conflicting data structures. [message #38237] |
Fri, 27 February 2004 08:11 |
Nuno Oliveira
Messages: 75 Registered: October 2003
|
Member |
|
|
I have I problem, and perhaps you can help...
I have pointer of structures. I defined in the main program as Data =
ptr_new(/allocate_heap)
And the when the user starts to generate events I have a structure like
this. I made it an isolated function just to avoid problems with
defining structures, but it still does. How is this possible?
PRO Add_NewStrct, s
new_strct = {tag1: name, tag2: array, tag3: ptr_new(/allocate_heap)}
new_strct.tag3 = Result_of_a_function()
;if it matters is the result is a pointer do pointers
if n_elements(*s.Data) eq 0 $
then *s.Data = new_strct $
else *s.Data = [*s.Data, new_strct]
return, s
end
The error idl indicates is: data conflicting strucutures <ptrHep xyz>
new_strct
I tought once the function is finished he would loose previuos
information about the strcuture? But it seems that's not it.
I was looking in old questions here, and I tried to use ptr_free for
that tag3, but I had the same problem again...
Cheers,
Nuno.
|
|
|