codenameone / CodenameOne

Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.

Home Page:https://www.codenameone.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Codename App turns slowly after some time using it.

JTBrandao opened this issue · comments

The App works quite well after login , but it becomes increaesily slow after some activities and finaly crashes. The issue occur´s only in iOs version (on Android works well).

This behavior became more critical after upggrading iOS to 16.1 version. Running on iOs 15 this issue was not so critical.

It seems like a memory retrieving issue.
Is there any codenameone orientation about this ?

note: We updated the iOs version to 16.2 and the problem persisted.

Note 2: We observed that exporting XCODE project and simulating on a device when launch any app interface and close it, the usage of memory always increase. We tried adding a java command "System.gc();" in our net.beans project but it didn´t worked.

We exported the project using CN1 resources and imported the project into a Mac Book Pro using XCODE. Performing a simulation on an iPhone 14 with iOs 16.2:
When we perform navigation sequences where we launch a "form" and click the "arrow to back" button in the upper corner to return to the previous interface. We've done these steps six times. Memory retention occurs on the device.
See memory retention graph in XCODE performing simulation on iPhone 14:
image

Below the navigation sequence:

Step 1: We have triggered the "Evolutions" option as illustrated below, this option will launch another "form"
image

Below is the image of the "form" released by the APP: There is simply the display of a "list of evolutions" as illustrated below:
image

Step 2 : We trigger the "set to the left" located in the upper left corner (to return to the previous "form".
In this button "left arrow" is declared a call back that will launch the previous "form" again.
image

The APP returns to the previous "form" as illustrated below:
image

We keep performing this sequence successively and observe in XCODE that memory is never freed.
After successive navigations in the APP it will become slow until it crashes. This crash reproduces in the simulation in XCODE.
This problem occurs only on iOs, on Android we do not notice this problem.
Any help to solve this problem will be very welcome, since the problem has very high severity.