Difference of handle and values classes

前端 未结 2 1344
忘掉有多难
忘掉有多难 2020-11-30 11:09

I have some C++ background and want to use classes in Matlab.

What is the difference between a handle and a value class?

I know that I would use a value clas

2条回答
  •  执念已碎
    2020-11-30 11:55

    It's actually quite simple, and different than the languages you note. Handle classes get passed by reference. Value classes pass by value. The difference from c/c++ is that mechanism is part of the type system, not an operation that can be performed on any variable.

提交回复
热议问题