Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2025-06

freeing a (olestr?) pwidechar

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marco van de Voort

I'm looking into
https://gitlab.com/freepascal.org/fpc/source/-/issues/41235

by  porting code from comobj.DispatchInvoke to variants.  However I need to deallocate a pwidechar allocated with StringToOleStr.

Comobj does with sysfreestring, which is the winapi widestring deallocation, and I can't quickly find a more portable example. Is there a construct to do this somewhat portable, like e.g.

pwidestring(theptr)^:=nil;

or do we miss a generic opposite to StringToOleStr here?

Reply by email