Profile cover photo
Profile photo
Alexandre Possebom
559 followers
559 followers
About
Alexandre's posts

Post has attachment

Post has shared content
Today I''ve read this excellent post by +Pierre-Yves Ricau.

Obviously the Dalvik VM uses an optimization that was once used in the stock Java VM as well. And dropped for good reasons in later VMs.

For some history here's a quote of a very old book from within SUN's Java series books (section A.3.3 Invisible (!) objects):

public void run() {
   try {
      Object foo = new Object();
      foo.doSomething();
   } catch (Exception e) {
      // whatever
   }
   while (true) { // do stuff } // loop forever
}

In this example, the object foo falls out of scope when the try block finishes. It might seem that the foo temporary reference variable would be pulled off the stack at this point and the associated object would become unreachable. After all, once the try block finishes, there is no syntax defined that would allow the program to access the object again. However, an efficient implementation of the JVM is unlikely to zero the reference when it goes out of scope. The object referenced by foo continues to be strongly referenced, at least until the run method returns. In this case, that might not happen for a long time. Because invisible objects can't be collected, this is a possible cause of memory leaks. If you run into this situation, you might have to explicitly null your references to enable garbage collection.

Note: This quote is from 2000 :-)

Post has attachment

Post has attachment

Post has shared content

Post has shared content

Post has attachment
Acompanhe os jogos do seu time !

Post has shared content

Post has shared content
MirrorLink - Making Apps for the Car

MirrorLink is the leading industry standard for car-smartphone connectivity. MirrorLink apps can run on any compliant smartphone, and will be usable from any compliant in-vehicle infotainment system. The open MirrorLink protocol handles the interface with the head unit, allowing developers to focus on creating innovative new content and user interfaces. No new SDK for developers to learn - just a thin API that provides information about the MirrorLink session. The MirrorLink certification program allows ensures that apps that can be used without distracting the driver, and allows apps to comply with local regulations.

Speaker:
Ed Pichon
Wait while more posts are being loaded