Giter Site home page Giter Site logo

Comments (9)

vicng avatar vicng commented on June 1, 2024

Thanks for bringing up this issue.

Running it on my machine, I see leaks (filtered by "Blockly") and allocations that aren't being deallocated (filtered by "BKY").

It's something that I was planning on looking at in the very near future, along with performance optimization (I've been putting it on hold while building out a features over the last few months). So please hold tight -- they will be fixed shortly!

from blockly-ios.

hatem93 avatar hatem93 commented on June 1, 2024

thanks for the fast response looking forward to the fixes

from blockly-ios.

hatem93 avatar hatem93 commented on June 1, 2024

any updates?

from blockly-ios.

vicng avatar vicng commented on June 1, 2024

Sorry, I have been busy/sidetracked for the last couple of weeks -- I will try to get a fix in this week.

from blockly-ios.

vicng avatar vicng commented on June 1, 2024

FYI, pull request #388 now fixes the sources of major memory leakage.

However, there's still one source of minor leakage that I can't seem to solve, which is from "ContiguousArrayStorage" (ie. arrays being created for Field objects). I suspect that it's a bug in the iOS SDK or even in Instruments, as it only shows up for iOS 10 and not 8/9.

The good news is that these remaining leaks only seem to occur when first loading a workbench with new blocks and that the leaks are small in memory.

I'll keep my eye on this issue though, I'm hoping WWDC 17/iOS 11 may provide more insight into the problem. If you continue running into large memory issues, let us know.

from blockly-ios.

hatem93 avatar hatem93 commented on June 1, 2024

thanks alot will let you know

from blockly-ios.

hatem93 avatar hatem93 commented on June 1, 2024

Sorry for the late response i have tried the new update, I am still having some leaks from blockly in my application and in the blockly sample application provided, I am not sure wether i am doing something wrong or not.

here is an image from the instruments from blocksample application

screenshot at may 20 16-58-39

still using the same configuration as before

i am now in the process of releasing my application on apple store do you know wether the memory leaks issue will lead to a rejection from apple.

from blockly-ios.

vicng avatar vicng commented on June 1, 2024

I don't think minor leaks will get you rejected by Apple (some of the iOS SDK leaks), but obviously it isn't a good sign if your app is leaking terribly.

When looking for leaks, it's more important to check for severity than existence. I usually check two things:

  1. Cyclical references - Does memory not get de-allocated (eg. after say popping a view controller)? This is the most severe type of leak and you shouldn't submit if you have any of them. None of these exist in the Blockly library, so if this is happening, it's most likely part of your codebase.
  2. Leaks due to bad reference counting (the Memory Leaks Instrument) - I've found that these happen just from using certain parts of the iOS SDK. It's hard to generate your own now with ARC so it's mostly making sure that you aren't calling those leaky parts too often (eg. you can see there's something leaky with NSNumberFormatter, which Blockly uses).

Lastly, make sure you're enabling "whole-module-optimization" when building for release. This will improve performance of your app and it may eliminate some of these leaks you have been seeing.

Hopefully this answers your questions.

If you have 5 minutes, please fill out our dev questionnaire too -- it really helps us out figure out how to cater to our devs.

Good luck on your submission!

from blockly-ios.

hatem93 avatar hatem93 commented on June 1, 2024

Thanks alot for the advices and the continous support

from blockly-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.