code: public static void checkSize(final int size, final String className) {
  		if (MemoryUtil.WARN_THRESHOLD < size) {
  			MemoryUtil.log(className + " may be leaking memory, it contains a large number of items: " + size);
  		}
  	}
docs: Performs default check on the size of a "registry" of UI widgets (or similar).
  In practice "size" is likely to be the size of a java Collection but it could be anything you want.
  
  This is a convenience which should be adequate for the majority of cases.
  
  @param size The current size of a component registry (or similar).
  @param className The name of the class which holds the registry.