comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Returning A Variable Length struct to IDL from C
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Returning A Variable Length struct to IDL from C [message #27840 is a reply to message #27675] Tue, 06 November 2001 08:27 Go to previous messageGo to previous message
Richard Younger is currently offline  Richard Younger
Messages: 43
Registered: November 2000
Member
Nigel Wade wrote:
>
> Really?. I run code which calls IDL_ImportArray many 1000s of times
> within a session, all with malloc'd data and have not had any
> problems.
>
> Why do you think it can only be used once per session, with static
> data?

It could be that IDL handles malloc() and free() just fine, but not
new[] and delete[], which is what K. seems to be using (though I'm not
sure about delete[]). I am not at all familiar with how new[] is
implemented, but it could use malloc() or include garbage collection, or
be radically different. From what I remember, I don't think it's in the
C++ spec and so would depend on your compiler.

> No, no, no! You're missing the entire purpose of DLMs.
> It's the realm of DLMs to do those things which are too complicated to do
> in IDL. ;-)

Well, complicated DLM's are part of the fun, but I think Craig's point
is that it's a little easier to manipulate IDL structures in, um, IDL.
;-) Though that code you posted should give anyone a good head start on
passing structures with arrays of strings.

Best,
Rich

--
Richard Younger
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Defining Integer Field in a Structure
Next Topic: Re: Color problems with 5.5/RH linux 7.1

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 03:22:57 PDT 2025

Total time taken to generate the page: 0.31745 seconds