in vc++ there are a number of structures with pointers to those structures, 
and they are empty.

typedef struct tsxSOBJ { };

in the API such stuctures are referenced as pointers *tsxSOBJ

If I had to do this in delphi, i would have to type cast everything (if 
possible) like I would in vc++

The function I'm refering to is a function in the API of the host 
application. It checks if a pointer to a geometry object is a metaball 
primitive and returns true or false. It also returns the parent (metaball) 
in one of the parameters, yet it returns nil if a nil is passed in there and 
that's where the problem is. However this is something the company has to 
fix. So if i built the structures in delphi (records), itd be pointless 
since there is nothing in there to work with, which is why I'm using type 
pointer. It works just fine, except in faulty functions.... which is kinda 
like faulty towers, one bad move and it's a bloody mess. =P

----- Original Message ----- 
From: "Rob Kennedy" <[EMAIL PROTECTED]>
To: "Delphi-Talk Discussion List" <[email protected]>
Sent: Tuesday, October 25, 2005 5:16 PM
Subject: Re: where does the memory go


> Richard R wrote:
>> Thanks for the info. I think I came up with a solution that doesnt cause 
>> a
>> memory leak. Since I'm dealing with the host application and conversion
>> from
>> vc++ headers, I have to deal with raw pointer types.
>
> No you don't. You're free to declare any pointer types you want. I
> encourage you to declare types that accurately reflect what they point at.
>
>> Now as to initializing
>> that variable I was refering to, I simply initialized it as variable:=
>> Pointer(1); And it works with the function. The function is faulty that 
>> it
>> returns nil if the variable is nil.
>
> What is the function supposed to do?
>
> -- 
> Rob
>
>
> __________________________________________________
> Delphi-Talk mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi-talk
> 
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to