A small problem and solution for Lambda

Source: Internet
Author: User

The cause is that a manager class has two sets, a collection is a collection of templates, and B is a collection of instances from the template.

But something in the B collection is always called in the A collection, causing an error.

The initial consideration of the improper use of clone, but after the examination did not find any problems, and later found that the problem is on the lambda

void Fsmconfig ()    {= c= = C.change (envobjstate.none, Envobjaction.none)        ;          = (Oldstate, arg) =        {            mstateowner.triggerstateimple (envobjstate.burning);        };

This code, Mstateowner, is empty. Cause an error

Later found that you are not clone, the creation of a good lambda link to the object is old, when the clone is good, the address has changed, but the link in the lambda address has not changed.

Summarize:

1. When using clone, confirm that the code that walks the constructor calls the process, because clone does not call the constructor

2.lambda try not to nest, as far as possible as a parameter in the

A small problem and solution for Lambda

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.