在函数头中我有这种情况:
我应该在最后保留“=null”,还是在退出函数时使用 Java 本身?
我的目的是让这些对象尽快为垃圾收集做好准备。这是一个软实时系统。
public BulkDataResponse(Double closePrice, Integer closeTime, Integer cmd,
String comments, Double commission, Integer digits,
Integer errorCode, Integer expiration, String login,
Integer magic, Double openPrice, Integer openTime,
Integer positionOrder, Double profit, Double rateClose,
Double rateMargin, Double rateOpen, Integer sourceId,
Double stopLoss, Double swap, String symbol, Double takeProfit,
Double taxes, Integer timeTick, Double volume)
{
super();
this.closePrice = closePrice;
this.closeTime = closeTime;
this.cmd = cmd;
this.comments = comments;
this.commission = commission;
this.digits = digits;
this.errorCode = errorCode;
this.expiration = expiration;
this.login = login;
this.magic = magic;
this.openPrice = openPrice;
this.openTime = openTime;
this.positionOrder = positionOrder;
this.profit = profit;
this.rateClose = rateClose;
this.rateMargin = rateMargin;
this.rateOpen = rateOpen;
this.sourceId = sourceId;
this.stopLoss = stopLoss;
this.swap = swap;
this.symbol = symbol;
this.takeProfit = takeProfit;
this.taxes = taxes;
this.timeTick = timeTick;
this.volume = volume;
closePrice = null;
closeTime = null;
cmd = null;
comments = null;
commission = null;
digits = null;
errorCode = null;
expiration = null;
login = null;
magic = null;
openPrice = null;
openTime = null;
positionOrder = null;
profit = null;
rateClose = null;
rateMargin = null;
rateOpen = null;
sourceId = null;
stopLoss = null;
swap = null;
symbol = null;
takeProfit = null;
taxes = null;
timeTick = null;
volume = null;
}