Consider the code line:
StringSource( cipher ,
true ,
new PK_DecryptorFilter( rng ,
decrypter ,
new StringSink( plainText ) ) );
The filter and the StringSink
object get created using new
now I'm curious whether I'm responsible for deleting those as I'm unsure how I would do that since I would need the pointers to these objects.
When looking at the test projects I can't seem to find a delete so I'm guessing these objects automatically get deleted once their job is fulfillled.
But since documentations can be wrong I figured I'd make sure.
Looking at the header and source for those classes, both of them end up assigning their attachment to a member_ptr
which deals with the deletion automatically. You shouldn't delete them yourself, just let the library handle it.