Question on ADLC's RegClass destructor

Krystal Mok rednaxelafx at gmail.com
Fri May 22 22:22:13 UTC 2015


Hi compiler team,

I came across this piece of code in ADLC, and I'm not sure if it's right or
not:

http://hg.openjdk.java.net/jdk9/jdk9/hotspot/file/ac291bc3ece2/src/share/vm/adlc/formsopt.cpp#l236

RegClass::~RegClass() {
  delete _classid;
}

Why do we need to delete the _classid field here? If this is needed, then a
bunch of other classes in formsopt.hpp would need the same treatment.

(I know this virtual destructor was added mainly for the two new
subclasses, but I'm just wondering about this one...)

Thanks,
Kris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20150522/d68c09db/attachment.html>


More information about the hotspot-compiler-dev mailing list