I’ve had a problem with an interface that both inherit from NSObject and AVplayer. Using the normal preloading code that is provided by apple wasn’t possible, because the instance wasn’t recognized
by the device during runtime. Some ideas:
You may already be familiar with the problem: You have created a program that creates graphics and if the graphics are then to be loaded into the GPU so that they can be rendered, a freeze occurs
because the GPU cache is full. And that's exactly what happened to the app whose statistics you can see above.
If the error occurs, there are often crashes because subsequent processes rely on the 3D models. Due to an update, the CoreCode Library was changed, which means that iOS now has even more
functions and since this requires more memory, such errors are occurring more and more at the moment.
Process: fseventsd [70]
Path: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/Support/fseventsd
Load Address: 0x101cb6000
Identifier: fseventsd
*** - [_ NSPlaceholderDictionary initWithObjects: forKeys: count:]: attempt to insert nil object from objects
On the picture you can see an example of the error, data could not be saved and therefore a subsequent function nil, i.e. nothing, tried to let it do a query.
Keep the following tips in mind to make your apps faster, or to keep them running smoothly:
1.Divide big processes and functions. Let the CPU or GPU do the process one by one.
2.Memory management: separate yourself from unused objects or unnecessary things when an error occurs.
override func didReceiveMemoryWarning () {
super.didReceiveMemoryWarning ()
let yourvariable = nil
}
3. Let's assume that you need a class, for example you want to place a SKNode on the SKScene. This is usually done as follows:
let node = SKNode ()
node.position = CGPoint (0,0)
node.name = "your mother"
let color = [array, of, colors]
let chosen = arc4ramdom_uniform (color.count)
node.color = chosen
The problem with this method is that even after adding by self.sceneView.addChildNode (node) the variables remain in RAM. I recommend that you simply delete unused variables by doing the
following: insert nil. let node = nil
4. Clear the RAM after frame update if no essential processes are running.
5. Use an efficient anti-virus program. Click on the banner below to buy an efficient and affordable program.

Kommentar schreiben