Click here to Skip to main content
15,889,595 members
Home / Discussions / Java
   

Java

 
QuestionRe: Need a detail describtion of the channel Pin
Richard MacCutchan29-Jul-14 6:34
mveRichard MacCutchan29-Jul-14 6:34 
AnswerRe: Need a detail describtion of the channel Pin
zcldzh2-Aug-14 4:28
zcldzh2-Aug-14 4:28 
GeneralRe: Need a detail describtion of the channel Pin
Richard MacCutchan2-Aug-14 5:23
mveRichard MacCutchan2-Aug-14 5:23 
QuestionJava project packaging Pin
sebuliba_f22-Jul-14 4:47
sebuliba_f22-Jul-14 4:47 
AnswerRe: Java project packaging Pin
Richard MacCutchan22-Jul-14 5:08
mveRichard MacCutchan22-Jul-14 5:08 
AnswerRe: Java project packaging Pin
TorstenH.24-Jul-14 2:12
TorstenH.24-Jul-14 2:12 
AnswerRe: Java project packaging Pin
Tushar Guru8-Sep-14 21:30
Tushar Guru8-Sep-14 21:30 
QuestionLocal Object Reference escaping Pin
Neo1010118-Jul-14 1:33
Neo1010118-Jul-14 1:33 
In terms of thread safety:

How can it be determined an object escapes a method call, without using JVM escape analysis?
('Escaping' means that an object can be accessed after the method completes)

A couple of examples on how an object can escape a method call:

1) The method returns the object that was locally created:
public MyObject someMethod(){  
    MyObject localObject = new MyObject();  
    return localObject();  
}

//Another thread can now mutate this object because it has a reference to it:
someMethod.changeSomething();

2) One of the methods called with the LocalObject as parameter, stores the LocalObject instance in a way that allows access to it from other threads.
MyMember member;

public void someMethod(){
    LocalObject localObject = new LocalObject();

    localObject.callMethod();
    method2(localObject);
}

public void method2(LocalObject localObject){
    localObject.setValue("value");
    member = localObject;
}


Does anyone know any more practical examples on how an object can escape a method call?
AnswerRe: Local Object Reference escaping Pin
jschell18-Jul-14 12:54
jschell18-Jul-14 12:54 
QuestionHow to check PDF is 3D or Normal in JAVA. Pin
Member 1094421913-Jul-14 20:58
Member 1094421913-Jul-14 20:58 
AnswerRe: How to check PDF is 3D or Normal in JAVA. Pin
Richard MacCutchan13-Jul-14 21:57
mveRichard MacCutchan13-Jul-14 21:57 
AnswerRe: How to check PDF is 3D or Normal in JAVA. Pin
jschell14-Jul-14 9:56
jschell14-Jul-14 9:56 
GeneralHow to make a database that is integrated within the application? Pin
extranghero13-Jul-14 4:45
extranghero13-Jul-14 4:45 
GeneralRe: How to make a database that is integrated within the application? Pin
Richard MacCutchan13-Jul-14 7:29
mveRichard MacCutchan13-Jul-14 7:29 
GeneralRe: How to make a database that is integrated within the application? Pin
extranghero17-Jul-14 2:58
extranghero17-Jul-14 2:58 
GeneralRe: How to make a database that is integrated within the application? Pin
Richard MacCutchan17-Jul-14 3:09
mveRichard MacCutchan17-Jul-14 3:09 
GeneralRe: How to make a database that is integrated within the application? Pin
Anton Koekemoer14-Jul-14 2:35
Anton Koekemoer14-Jul-14 2:35 
GeneralRe: How to make a database that is integrated within the application? Pin
jschell14-Jul-14 9:58
jschell14-Jul-14 9:58 
GeneralRe: How to make a database that is integrated within the application? Pin
TorstenH.16-Jul-14 4:13
TorstenH.16-Jul-14 4:13 
GeneralRe: How to make a database that is integrated within the application? Pin
extranghero17-Jul-14 3:08
extranghero17-Jul-14 3:08 
GeneralRe: How to make a database that is integrated within the application? Pin
extranghero17-Jul-14 3:02
extranghero17-Jul-14 3:02 
GeneralRe: How to make a database that is integrated within the application? Pin
Geoffrey Moir28-Sep-14 23:56
Geoffrey Moir28-Sep-14 23:56 
GeneralRe: How to make a database that is integrated within the application? Pin
Member 1093474010-Aug-14 16:25
Member 1093474010-Aug-14 16:25 
GeneralRe: How to make a database that is integrated within the application? Pin
extranghero6-Sep-14 2:16
extranghero6-Sep-14 2:16 
QuestionHow to convert java coding to exe file Pin
Member 1050111011-Jul-14 23:25
Member 1050111011-Jul-14 23:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.