Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
XtremeCheese
Posts: 22
Registered: ‎03-03-2013
My Device: Z10, Q10, Bold 9900, Bold 9700
My Carrier: Rogers
Accepted Solution

SqlDataAccess execute() calls resulting in memory not being freed

[ Edited ]

When I go and make a bunch of updates or writes to my locally stored database, it appears that some memory is not being freed after the calls to execute().

 

This is an example of a call that I am making:

 

#define UPDATE_ENTRY "UPDATE Trips SET date=:date, description=:description, startLocation=:startLocation, endLocation=:endLocation, startMileage=:startMileage, endMileage=:endMileage, reason=:reason WHERE id=:id;"


...


_database->execute(UPDATE_ENTRY, tripMap);  //Trip map is a map containing the data to be added

 

I'm currently adding a headless portion to my application, and when I go to do about 500+ database updates, I get thrown over the 3MB memory limit which shuts down the application.  Obviously this is a major problem, but I'm wondering if it's just due to me doing something wrong or if it's actually an issue with the SqlDataAccess class itself.  Does anyone have any suggestions?

 

Please use plain text.
Developer
simon_hain
Posts: 15,863
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: SqlDataAccess execute() calls resulting in memory not being freed

use QtSql.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Contributor
XtremeCheese
Posts: 22
Registered: ‎03-03-2013
My Device: Z10, Q10, Bold 9900, Bold 9700
My Carrier: Rogers

Re: SqlDataAccess execute() calls resulting in memory not being freed

Thanks!  That seems to have resolved my issues.  I think I'll look into submitting a bug report for this issue.

Please use plain text.
Developer
greenmr
Posts: 871
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: SqlDataAccess execute() calls resulting in memory not being freed

I looked for a reference to "3MB memory limit" in the documentation but I can't find anything and I've never heard of it before. Can you elaborate?


XtremeCheese wrote:

When I go and make a bunch of updates or writes to my locally stored database, it appears that some memory is not being freed after the calls to execute().

 

This is an example of a call that I am making:

 

#define UPDATE_ENTRY "UPDATE Trips SET date=:date, description=:description, startLocation=:startLocation, endLocation=:endLocation, startMileage=:startMileage, endMileage=:endMileage, reason=:reason WHERE id=:id;"


...


_database->execute(UPDATE_ENTRY, tripMap);  //Trip map is a map containing the data to be added

 

I'm currently adding a headless portion to my application, and when I go to do about 500+ database updates, I get thrown over the 3MB memory limit which shuts down the application.  Obviously this is a major problem, but I'm wondering if it's just due to me doing something wrong or if it's actually an issue with the SqlDataAccess class itself.  Does anyone have any suggestions?

 






Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.
Please use plain text.
Contributor
XtremeCheese
Posts: 22
Registered: ‎03-03-2013
My Device: Z10, Q10, Bold 9900, Bold 9700
My Carrier: Rogers

Re: SqlDataAccess execute() calls resulting in memory not being freed

If you refer to the "Resource Management" section of the Headless Applications documentation, it states that the headless portion of the application can only occupy 3MB of memory.

Source: https://developer.blackberry.com/native/documentation/cascades/device_platform/headless_apps/
Please use plain text.
Developer
greenmr
Posts: 871
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: SqlDataAccess execute() calls resulting in memory not being freed

Ahhh, that's why I hadn't heard of it, I haven't done any headless app stuff yet, although I do have plans in the pipeline. Thanks for clarifying.

 


XtremeCheese wrote:
If you refer to the "Resource Management" section of the Headless Applications documentation, it states that the headless portion of the application can only occupy 3MB of memory.

Source: https://developer.blackberry.com/native/documentation/cascades/device_platform/headless_apps/





Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.
Please use plain text.
Developer
Royster86
Posts: 102
Registered: ‎03-13-2012
My Device: 9360, P'9981, Z10
My Carrier: Vodafone, Virgin

Re: SqlDataAccess execute() calls resulting in memory not being freed

I had exactly the same issue with SqlDataAccess, and had the same headless use-case with the 3mb limit. Using QtSql now for headless and so far so good - process memory is no longer going up and never getting freed.

Was a issue raised in the issue tracker? I've had a quick search and can't find anything related.
Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 660
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: SqlDataAccess execute() calls resulting in memory not being freed

I don't see this issue in the Issue Tracker.

This thread was started in November, which would have afforded plenty of time to fix this in 10.2.1, but if no one logs bugs, then we don't see them.

I have just opened an issue internally to investigate.

 

In the future, please open bugs using the Issue Tracker:

https://www.blackberry.com/jira/secure/Dashboard.jspa

 

Please use plain text.