FLIR One Developer / Blog / Topics / iOS, SDK / possible memory leaks in the sample code

possible memory leaks in the sample code

Home Forums FLIR ONE SDK Development iOS development Installation and getting started possible memory leaks in the sample code

Tagged: ,

This topic contains 3 replies, has 3 voices, and was last updated by Profile photo of Dominique Dominique 1 year, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)

  • Author

    Posts

  • #5215

    Profile photo of Sean
    Sean

    Participant

    Hi,

    I build the sample code FLIROneSDKExampleApp from iOS SDK (0.2.10), profile it through Instrument in iPad mini, I didnot do anything after ui appeared

    Is this right way to profile/check leaks?

    Thanks,

    sean

    Here are some memory leaks found:

    Malloc 288 Bytes 1 0x10a24a320 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x170c77040 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a249c60 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 288 Bytes 1 0x10a24a0e0 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 288 Bytes 1 0x10a24a8c0 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x174e77380 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a24ae60 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x170e71c00 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e770c0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 80 Bytes 1 0x17009ba30 80 Bytes FLIROneSDKExample FLIR::CServerResource::Init(FLIR::CResource::RES_TYPE_T, unsigned int, FLIR::CResourcePath const&, unsigned short, unsigned short)
    Malloc 288 Bytes 2 < multiple > 576 Bytes FLIROneSDKExample CResCalibModule::CreateImpl(FLIR::CServerResource*)
    Malloc 16 Bytes 2 < multiple > 32 Bytes FLIROneSDKExample FLIR::CResourceValue::CResourceValue(FLIR::CResourceValue::VALUE_TYPE_T)
    Malloc 64 Bytes 1 0x170e71c80 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a249d80 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x170e71cc0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 80 Bytes 1 0x17009bad0 80 Bytes FLIROneSDKExample FLIR::CServerResource::Init(FLIR::CResource::RES_TYPE_T, unsigned int, FLIR::CResourcePath const&, unsigned short, unsigned short)
    Malloc 64 Bytes 1 0x174e77040 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77740 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77840 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a249900 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x174e77980 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e774c0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a249fc0 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x170e71c40 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77440 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e772c0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x102bbce00 288 Bytes FLIROneSDKExample FLIR::CVersionSupport::Init()
    Malloc 64 Bytes 1 0x174e77900 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x17107a640 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174c73c80 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77640 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e771c0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 2 < multiple > 128 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77180 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 3 < multiple > 864 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 288 Bytes 1 0x10a24a440 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x174e77140 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x170e71d00 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a249ea0 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 288 Bytes 1 0x10a24ad40 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x170e702c0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174c73dc0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x170e71d80 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77940 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x102b78540 288 Bytes FLIROneSDKExample CLibCreateTopNodes::Init()
    Malloc 288 Bytes 1 0x102bbf3e0 288 Bytes FLIROneSDKExample FLIR::CVersionSupport::Init()
    Malloc 64 Bytes 3 < multiple > 192 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77000 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a249b40 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x174e77080 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x102a48130 288 Bytes FLIROneSDKExample CIFCLens::CommonInit(CText const&)
    Malloc 64 Bytes 1 0x174e77340 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77580 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a24a9e0 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x174e77480 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x17107a740 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a3151d0 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x174e77780 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 3 < multiple > 192 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x17106bc00 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e773c0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 3 < multiple > 864 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 288 Bytes 1 0x102bbf500 288 Bytes FLIROneSDKExample FLIR::CVersionSupport::Init()
    Malloc 64 Bytes 1 0x17106bd00 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77540 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a33ec60 288 Bytes FLIROneSDKExample FLIR::CSystemCapability::AddHwCapabilityValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 80 Bytes 1 0x17009bb20 80 Bytes FLIROneSDKExample FLIR::CServerResource::Init(FLIR::CResource::RES_TYPE_T, unsigned int, FLIR::CResourcePath const&, unsigned short, unsigned short)
    Malloc 64 Bytes 1 0x174e77500 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a3150b0 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 3 < multiple > 192 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x170e71d40 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x170c72a00 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77700 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77600 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x17106bc80 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77100 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e776c0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a249a20 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 288 Bytes 1 0x10a24a560 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x17106bcc0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77a00 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x102bbf620 288 Bytes FLIROneSDKExample FLIR::CVersionSupport::Init()
    Malloc 288 Bytes 1 0x10a24a7a0 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 3 < multiple > 192 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a24ab00 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x174e775c0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x17106bd80 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a24a680 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 2 < multiple > 128 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77800 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x102bbf740 288 Bytes FLIROneSDKExample FLIR::CVersionSupport::Init()
    Malloc 80 Bytes 1 0x17009ba80 80 Bytes FLIROneSDKExample FLIR::CServerResource::Init(FLIR::CResource::RES_TYPE_T, unsigned int, FLIR::CResourcePath const&, unsigned short, unsigned short)
    Malloc 64 Bytes 1 0x170c729c0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x170e71dc0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a24ac20 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x174e77280 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77300 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e777c0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x170e71e00 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x17106bc40 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77880 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77400 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x170c77200 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77240 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 80 Bytes 1 0x17009b9e0 80 Bytes FLIROneSDKExample FLIR::CServerResource::Init(FLIR::CResource::RES_TYPE_T, unsigned int, FLIR::CResourcePath const&, unsigned short, unsigned short)
    Malloc 288 Bytes 1 0x102acb530 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 288 Bytes 1 0x10a3152f0 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 64 Bytes 1 0x174e77200 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 288 Bytes 1 0x10a24a200 288 Bytes FLIROneSDKExample FLIR::CSystemConfig::AddConfigValue(FLIR::CResourcePath const&, FLIR::CResourceValue const&)
    Malloc 80 Bytes 1 0x170096cb0 80 Bytes FLIROneSDKExample FLIR::CServerResource::Init(FLIR::CResource::RES_TYPE_T, unsigned int, FLIR::CResourcePath const&, unsigned short, unsigned short)
    Malloc 64 Bytes 1 0x174e778c0 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)
    Malloc 64 Bytes 1 0x174e77680 64 Bytes FLIROneSDKExample CText::AllocString(CText::CHAR_TYPE_T, unsigned long)

    #5346

    Profile photo of Peisen
    Peisen

    Moderator

    Hi Sean,

    Apple provides a guide on locating the section of the code that is causing the memory leaks using Instruments profiler in Xcode.

    https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/FindingLeakedMemory.html

    #5347

    Profile photo of Sean
    Sean

    Participant

    Those log messages are from Instrument profiler which show flir sdk has memory leaks.

    Would you please check your flir sample code?

    #5992

    Profile photo of Dominique
    Dominique

    Moderator

    Hi Sean,

    Were you able to get this worked out?

    Thank you,
    Dominique Strauss

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.