The FlexiCapture Engine 11 User Guide says:

You can get the list of not released objects, if you call the IEngine::StartLogging method before deinitialization.

My code (note that Engine and libraryHandle have been initialized, and StartLogging was called):

  CSafePtr<iengine> Engine;
  static HMODULE libraryHandle;
  ...
  Log::log("UnloadFCEngine: begin\n");
  // Create an object that won't be released, hoping to see it mentioned in the log
  IImageLoadingParams* imageLoadingParams;
  CheckResult( Engine->CreateImageLoadingParams(&imageLoadingParams) );
  // Deinitialize FlexiCapture Engine
  typedef HRESULT ( STDAPICALLTYPE* DeinitializeEngineFunc )();
  DeinitializeEngineFunc pDeinitializeEngine =
    ( DeinitializeEngineFunc )GetProcAddress( libraryHandle, "DeinitializeEngine" );
  if( pDeinitializeEngine == 0 || pDeinitializeEngine() != S_OK ) {
    throw CAbbyyException( L"Error while unloading ABBYY FlexiCapture Engine" );
  }
  FreeLibrary( libraryHandle );
  libraryHandle = 0;
  Engine = 0;
  Log::log("UnloadFCEngine: end\n");

The resulting log messages:

06-22-2016 12:09:19 UnloadFCEngine: begin
12:09:19.842, 0 ms,     IEngine::CreateImageLoadingParams( ( IImageLoadingParams ** )0x28fb10 )
06-22-2016 12:09:21 UnloadFCEngine: end

No message about an unreleased ImageLoadingParams object. I know I've seen this work in earlier versions. What am I missing?

thanks/jeff

asked 22 Jun '16, 19:37

JeffGlass's gravatar image

JeffGlass
111


Hi Jeff,

Thank you very much for your attentiveness and for your report!

The Help contains incorrect information, we apologize for the inconvenience. This is expected behavior: the list of not released objects isn't displayed in the log because in environments with GC (.Net, Java) there is no possibility to separate real leaks from objects that are holded by GC, so in such environments this feature gives false information.

In the next release of FCE 11 (FCE 11 R3) we will add the specific method of logging that would allow to detect unreleased objects.

link

answered 05 Jul '16, 17:41

Anna%20Falevskaya's gravatar image

Anna Falevskaya ♦♦
715

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2
×2
×1
×1

Asked: 22 Jun '16, 19:37

Seen: 480 times

Last updated: 05 Jul '16, 17:41

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal