- edited description
Memory Leak
In the ObjectC project, when I use the method of"imebra:: DataSet:: getImageAppleModalityTransfirm", there was a memory leak, and then I located it at the bottom of the stack caused by " imebra:: implementation:: memoryPoll:: getMemory".
Comments (5)
-
reporter -
repo owner - changed status to on hold
Imebra has a configurable memory cache that hold some of the de-allocated memory for faster allocation when processing images with the same size.
I should see the code of the client app before considering this as a bug.
-
repo owner Issue
#251was marked as a duplicate of this issue. -
reporter NSString filePath = [[NSBundle mainBundle]pathForResource:@"MRBRAIN" ofType:@"DCM"]; ImebraDataSet dataSet = [ImebraCodecFactory loadFromFile:filePath error:nil]; // 获取帧数 ImebraTagId *tagId = [[ImebraTagId alloc] initWithId:ImebraTagNumberOfFrames_0028_0008]; NSUInteger dataSetPage = [dataSet getSignedLong:tagId elementNumber:0 error:nil]; NSLog(@"%lu",(unsigned long)dataSetPage);
self.resultArr = [[NSMutableArray alloc] init]; NSError *appleError; for (int i =0; i<dataSetPage; i++) { @autoreleasepool { ImebraImage *image = [dataSet getImageApplyModalityTransform:i error:&appleError]; if (appleError) { NSLog(@"%u",i); break; } NSString *colorSpace = image.colorSpace; uint32_t width = image.width; uint32_t height = image.height; ImebraTransformsChain *chain =[DicomUtils applyTransformationColorSpace:colorSpace dataSet:dataSet image:image width:width height:height]; UIImage *img = [DicomUtils generateImage:chain withImage:image]; [_resultArr addObject:img]; } }
-
reporter .this is source code
- Log in to comment