There is a very large memoy leak when using the C++ API and LNRichText Insert or Append. I have a database that I am grabbing the Body field of each email (!70k emails) and either Appending or Inserting to the bottom of a temporary document. I then Exoport that to a binary and then use the NewExportRTFFunction to export to an rtf format. If I can complete the 70k emails I will notice ~200mb of leaked memory. This usua,y will not complete as I run out of Memory handles that Notes allocates. So far I have been albe to get around the issue by using NSFItemCopy first and then building some tables on top of that. That has saved me ~100mb of leaks. I still see about ~100mb using other C++ calls and I think they are all realted around the LNRichText. I have seen some posts to this effect dated back to 1999 with the same issues.
Will this ever get looked at and fixed?
Thanks, Joey
Subject: Probably no fix coming…
The C++ API is not an area of active development, and we’re encouraging people not to use it. Is this something you can’t do with the supported APIs? It doesn’t sound all that complicated and the LotusScript or Java rich-text methods should be able to handle it.
Subject: No, I need it
I am building a C++/CLI assembly that is used to do the export. I build tables and and add the richtext to a temp document before exporting to rtf. If there was clearer instructions on how to work with CD records and building tables with the C API, I would use it instead. If you have a good set of instuctions on how to build tables and work with CD records, please let me know. Can you share why the C++ API is not actively being worked on?
Thanks,
Joey
Subject: why does the C++ API languish?
I believe it’s because we have limited resources (like everyone) and there aren’t a lot of people clamoring to use it.
There are actually many nice samples in the C API documentation and downloads, but perhaps it would be easier to use a 3rd party API such as Midas from geniisoft.