login about faq

Using Chilkat RSA ActiveX with Delphi 2007. Pardon me, I know VCL pretty well. But when it comes to ActiveX controls not as versed.

I suspect my code has a memory leak. At least FastMM is pointing to it. I have signing function which creates a TPrivateKey:

    pkey := TprivateKey.Create(nil).ControlInterface;

But I am not freeing it (pkey.free gives compiler error).

Is this a memory leak? If so how do I get around it?

asked Jan 21 '15 at 22:45

Mark%20S's gravatar image

Mark S
31


See the online Chilkat reference documentation for each Delphi ActiveX class: http://www.chilkatsoft.com/refdoc/delphiPrivateKeyRef.html

You would call the Free method.

However, in your code snippet above, pkey is a COM interface, meaning it is an IPrivateKey and not a TPrivateKey. The "T" class is the OLE Control Proxy class. "Free" is a method of the "T" class.

link

answered Jan 22 '15 at 17:59

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Thank you... Did not know it could be used natively. I thought it needed to be com interface.

(Jan 23 '15 at 09:11) Mark S
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×96
×56
×10

Asked: Jan 21 '15 at 22:45

Seen: 870 times

Last updated: Jan 23 '15 at 09:11

powered by OSQA