how can one avoid boxing when using function

Hi,  I am trying to figure out how to avoid boxing because the performance hit is killing me.  As an experiment I wrote the following code:
object X {  def main(args:Array[String]) { val b = new B[Int](3)     while(true) {      b.foreach(_ + 1)     }  }}
class B[@specialized(Int)A](val a:A) { def foreach(f: A => Unit) = f(a) }
Sadly, when I look at the byte code the foreach method is still boxing.  In my actual application I am writing a custom collection that always contains ints and I need to get around the boxing.  Any suggestions?
Jesse

Copyright © 2013 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland