Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How report bugs in items in code.coronalabs.com? E.g., ScrollView V1.1
Started by sieler2 May 09 2019 03:40 PM

- - - - -
4 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

sieler2

[GLOBAL: userInfoPane.html]
sieler2
  • Contributor

  • 105 posts
  • Corona SDK

Hi,

 

I needed a scrollable text box, and found/leveraged the code at 

https://code.coronalabs.com/code/scrollview-v11-modified-version

 

I did some testing ...creating / destroying a scrollview in a loop ... and noticed that general memory (not texture memory) was leaking about 12KB per scroller:destroy.

 

I suspect the problem is in the widget_momentumScrolling.lua

portion (because my simplified version doesn't use it, and has no memory leak).

 

Yes, I spent some time trying to figure it out, but didn't find a smoking gun, sorry.  If I had access to tools that showed me how memory was currently being used (e.g., like the lab should have), I suspect one could easily zero in on the problem.  I do know that the different between "display.remove (x)" and "x:removeSelf()" is not the cause.

 

It's not clear who I'd report the bug to.

 

Attached is the project for my minimally modified version (simpler test call, with looping and memory test).

 

The forum refused to let me attach an Android apk, so it's at:  http://www.sieler.com/MyScroller

(as is the .zip of the project)

 

Simply open the app with Corona, which starts it, and look at the Corona console for output.

 

thanks,

 

Stan

Attached Files



[TOPIC: post.html]
#2

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 2,120 posts
  • Corona SDK

If you create/destroy lots then lua memory will increase until it is garbage collected.  This is perfectly normal behavior.



[TOPIC: post.html]
#3

sieler2

[GLOBAL: userInfoPane.html]
sieler2
  • Contributor

  • 105 posts
  • Corona SDK

@SGS...ah, sorry ... I should have clearly stated in the post: I garbage collected every loop :)

 

(You wouldn't know, but I've been testing languages with garbage collection since I wrote my own garbage collector

for InterLISP back in 1973 :)

 

And, indeed, it's my per-loop garbage collector that allows me to easily see that we lose 12 KB per call.

 

thanks,

 

Stan



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,072 posts
  • Enterprise

The code.coronalabs.com code is very old. I wasn't aware that anyone was still finding content there.

 

Those widgets have been replaced by the current widget.* API library, which is open source and can be found on https://github.com/CoronaLabs if you're interested in digging into the widget library.

 

Rob



[TOPIC: post.html]
#5

sieler2

[GLOBAL: userInfoPane.html]
sieler2
  • Contributor

  • 105 posts
  • Corona SDK

@Rob ... hi!

 

My friend, Mr Google, found it :)

 

I'll check your link, thanks!

 

Stan




[topic_controls]
[/topic_controls]