Re: StringSource is using "new" operator. Should be deleting the memory or is it auto destroyed?
Jeffrey Walton <[email protected]> Thu, 27 Apr 2023 13:35:30 -0400
| Newsgroups | gmane.comp.encryption.cryptopp |
|---|---|
| Message-ID | <CAH8yC8=bpnWtPR-J4VBPWX0b1-amHU=PZcs65UMDtaGnHH_eLg@mail.gmail.com> |
On Thu, Apr 27, 2023 at 1:31 PM Dwight Kulkarni <[email protected]> wrote: > > I note an example code sample for b64encode(..). I note that there are "new" calls inside the constructor(..). > > The result is returned in the encoded string. > > Do I need to do anything to delete the memory from the new calls ? > > What happens to the memory in the variable "encoded", if the variable is passed up to another function and the StringSink is destroyed. > > Should I make a copy of encoded and send it on to be safe ? https://www.cryptopp.com/wiki/Pipelining#Ownership Jeff -- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/CAH8yC8%3DbpnWtPR-J4VBPWX0b1-amHU%3DPZcs65UMDtaGnHH_eLg%40mail.gmail.com.