Menu ▾ ▴

#82 ZBarReaderView IOS memory leak CFData while scanning

latest_mercurial
open
nobody
9
2014-08-24
2014-07-08
FLEDREF
No

Hello,

I have problems using ZBar on iOS 7.1.2. I use ZBarReaderView (not the controller), and I've got a problem with growing CFData in Instruments while start scanning. If I stop scanning, growing stop too. But if i restart again it'll continue to grow.

The exemple is easy to make, just add UIView into storyboard, identify it as ZBarReaderView in Builder, attach it to IBOutlet in view controller. (scanRectView is my IBOutlet of type ZBarReaderView)

Then in viewDidLoad add :

// Set ZBar delegate
scanRectView.readerDelegate = self;
// Activating symbol type
[scanRectView.scanner setSymbology:ZBAR_EAN8 config:ZBAR_CFG_ENABLE to:1];
[scanRectView.scanner setSymbology:ZBAR_EAN13 config:ZBAR_CFG_ENABLE to:1];
[scanRectView setEnableCache:NO];

[scanRectView start];

After starting, look at the memory usage, it'll grow up, even if i flushCache or/and stop then restart.

Is That default behavior or how can i reset this CFdata.

Ty if you have any questions tell me.

[scanRectView start];
1 Attachments

Discussion


Log in to post a comment.