Way to create BLF file, when to delete

Issue #19 resolved
Former user created an issue

Hello,

This is more of a question rather than a bug, just me being confused.

I have been testing a few ways to create blf files from looking at the Write example.

What is the proper way to get the canMessage object deleted? I have been testing on a few files and if the blf file is BIG the memory footprint is even larger.

It is not obvious to me when the "new"ed object is deleted. Since it is added to a queue and then eventually written to file. I was looking around but could not find a place were memory is returned.

Comments (3)

  1. Tobias Lorenz repo owner

    Hi,

    sorry for the delay, you saw that some e-mails got lost in the GMX spam filter…

    So the objects get deleted in File::readWriteQueue2UncompressedFile. The last operation therein is a “delete ohb”. So basically the ownership is given to the library. I want to make ownership clear by replacing the standard pointers “*” to “std::unique_ptr”, but I hesitate as this would be a major interface change…

    Bye Tobias

  2. Log in to comment