Manage Memory - Count Number of Pages in Word Document using Aspose.Words for C++ native API

Tested version: Aspose.Words.Cpp_19.11.1 x64 Releae

Here is my test code

void testWordsConvert() {
System::String fileName2 = System::String(u"…\Words\Template.doc");
auto doc = MakeObject<Aspose::Words::Document>(fileName2);
printf("pageCount: %d\n", doc->get_PageCount());
}

Memory using will increase at least 3mb when I run this code once.

@kngstr,

Please ZIP and upload your input Word document (Template.doc) you are getting this problem with here for testing. We will then investigate the issue on our end and provide you more information.

@awais.hafeez

Here is the file
Template.zip (74.7 KB)

Just took from your examples.

@kngstr,

We are working on your query and will get back to you soon.

@awais.hafeez

OK. Thanks.

@kngstr,

Thanks for being patient. We have logged your problem in our issue tracking system. Your ticket number is WORDSCPP-925. We will further look into the details of this problem and will keep you updated on the status of the linked issue. We apologize for your inconvenience.

@awais.hafeez

Thanks. I’ll be waiting.

@kngstr,

The issues you have found earlier (filed as WORDSCPP-925) have been fixed in this Aspose.Words for C++ 20.3 update.

@awais.hafeez

Thanks.
But it still has this problem.

@kngstr,

We are checking this scenario and will get back to you soon.

The issue(s) you have found earlier (filed as WORDSCPP-925) have been fixed in this Aspose.Words for C++ 21.1 update.