Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
iOS Development
NSXML help required
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Nethfel" data-source="post: 1288087" data-attributes="member: 89124"><p>How would you want the data stored? For example, would you want:</p><p></p><p>Object represent a specific project containing a list of sub projects</p><p>Object represent a specific sub project containing a list of the file name for the docid?</p><p></p><p>I'm trying to understand how you want the data represented to help give a better answer.</p><p></p><p>Usually you create a new variable for each element as its triggered and add it to the appropriate parent variable (whether it be an object or an array, etc.) once the given element has been finished being parsed then release the variable that holds that element.</p><p></p><p>You on the other hand, allocate all of the memory you think you need at once when the parent element you are looking for is found which may not be good because what happens if you have many sub documents? plus when you reach the end of the element, you don't release any of the allocated memory and re-allocate new memory for those areas when a new element is found so if you have 50 sub projects, you'll have 49 sets of leaked memory as it's coded right now.</p></blockquote><p></p>
[QUOTE="Nethfel, post: 1288087, member: 89124"] How would you want the data stored? For example, would you want: Object represent a specific project containing a list of sub projects Object represent a specific sub project containing a list of the file name for the docid? I'm trying to understand how you want the data represented to help give a better answer. Usually you create a new variable for each element as its triggered and add it to the appropriate parent variable (whether it be an object or an array, etc.) once the given element has been finished being parsed then release the variable that holds that element. You on the other hand, allocate all of the memory you think you need at once when the parent element you are looking for is found which may not be good because what happens if you have many sub documents? plus when you reach the end of the element, you don't release any of the allocated memory and re-allocate new memory for those areas when a new element is found so if you have 50 sub projects, you'll have 49 sets of leaked memory as it's coded right now. [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
iOS Development
NSXML help required
Top