diff --git a/cpp/ycm/CandidateRepository.h b/cpp/ycm/CandidateRepository.h index 0674cfc3..7ad8ec0d 100644 --- a/cpp/ycm/CandidateRepository.h +++ b/cpp/ycm/CandidateRepository.h @@ -33,6 +33,15 @@ struct CompletionData; typedef boost::unordered_map< std::string, const Candidate * > CandidateHolder; + +// This singleton stores already built Candidate objects for candidate strings +// that were already seen. If Candidates are requested for previously unseen +// strings, new Candidate objects are built. +// +// This is shared by the identifier completer and the clang completer so that +// work is not repeated. +// +// This class is thread-safe. class CandidateRepository : boost::noncopyable { public: static CandidateRepository &Instance();