• 对象垃圾回收机制回收然后单例类又被重新加载

    Singleton classes destroyed by garbage collection, then reloaded.

    youdao

  • 大致意思作为一个单例类保持这种完全存在安全表象

    It's implemented as a singleton to maintain some semblance of type safety that is completely non-existent.

    youdao

  • 由于也是单例的实,所以可能出现多个单例并存的情况。

    Since an instance of a subclass is an instance of your superclass, you could find multiple instances of the singleton.

    youdao

  • 他们发现每次他们创建一个不同单例时候,都不得不同样代码

    Those who use it will find that they often have to write the same code each time they want to create a different Singleton class.

    youdao

  • 单例副本运行多个虚拟中时,每个虚拟机都会创建一个对象

    When copies of the singleton class run in multiple VMs, an instance is created for each machine.

    youdao

  • 一个可用创建需要每个特定的重写单例模式代码可重用的

    This is a class that can be used repeatedly to instantiate a class as a singleton without having to re-write the singleton pattern code for that specific class.

    youdao

  • 对象被当着垃圾回收然后单例又被重新加载,一个新的单例对象创建

    When a singleton class is garbage-collected and then reloaded, a new singleton instance is created.

    youdao

  • 同时如果使用创建方法实现单例模式,还具有创建多个变通能力。

    Likewise, with a singleton implemented as single instance, you leave open the possibility of altering the class to create more instances in the future.

    youdao

  • 10中的gameservice一个单例类代表给定游戏游戏服务器当前状态

    The GameService class, in Listing 10, is a singleton class that represents the game server and the current state of the given game.

    youdao

  • 最后,在模式一些实现方式中,单例的子能够动态地重载方法,这是静态方法不能办到的。

    With some implementations of the singleton, you allow writers of subclasses to override methods polymorphically, something not possible with static methods.

    youdao

  • 系统中原来一个邪恶例类系统代码中的核心角色我们现在正在清除这个这样可以改善更多的代码设计

    There has been a pernicious Singleton that has played a central role in our code and is now being killed off, because that will open up our code for many more design improvements.

    youdao

  • Jeremy认为大多数开发者没有正确使用Ruby对象所以话题比较高阶,谈论了诸如单例类(singleton classes)instance_eval。

    Jeremy believes that most programmers don't use Ruby's objects right, so his talk sheds some light onto advanced topics like singleton classes and the instance_eval.

    youdao

  • 相反可以定义对象(而不是)并且将成为单例

    Instead you can define some as an object (instead of a class) and it becomes a singleton instance of the class.

    youdao

  • 模式非常有用设计模式,它允许对外提供但是犯的错误在于不止一个实创建

    The singleton is a useful design pattern for allowing only one instance of your class, but common mistakes can inadvertently allow more than one instance to be created.

    youdao

  • 单例模式有用的控制访问途径他能保证只有存在

    Singletons are a useful way to control access to a class, making sure that only one instance can exist.

    youdao

  • 比如数据库连接就是单例设计模式一个子:我们一般不想让应用程序具有连接池多个资源密集型

    An example use case for a singleton would be a database connection pool: you don't want your application to have multiple resource-intensive instances of a connection pool class.

    youdao

  • 单例模式确实能够轻而易举解决无须对每个引用进行存储问题

    They easily solve the problem of not having to store references to every class.

    youdao

  • 这样分离结构代码有利于保持按单例模式使用或不按单例模式使用的灵活性。

    This has the added benefit of separating singleton code from the class code leaving the flexibility to use several instances of the class or using the class as a singleton.

    youdao

  • 由于单例对象作为存在而不是静态成员,所以能够惰性初始对象,即需要在第一次时候去创建它。

    With singletons implemented as single instances instead of static class members, you can initialize the singleton lazily, creating it only when it is first used.

    youdao

  • 3单例显然更为准确更为重要一点使用PHPLSB引用适当的覆盖静态

    The singleton in Listing 3 is certainly more concise, but what's important is the use of PHP's LSB to reference the appropriate overridden static attribute.

    youdao

  • 4显示了使用方法而非属性指定适当单例

    Listing 4 shows a version of the singleton that USES a method instead of an attribute to specify the appropriate class.

    youdao

  • 尽管实现使用是子其他模式比如稍后介绍的活动记录模式)需要引用其他的静态属性

    Whereas the singleton implementation uses the subclass's class name, other patterns (such as active record, covered later) need to reference other static properties.

    youdao

  • 模式可能常用OOP设计模式之一了;限制了一个的对象只能1

    The singleton pattern is probably one of the most often used OOP design patterns; it restricts the number of object instances of a class to one.

    youdao

  • 提供一组(singleton)对象一个JAX-RS应用程序包括所有根级别资源提供程序(由 @Provider注释)。

    This class provides a set of classes, or a set of singleton object instances, that include all of the root-level resources and providers (classes annotated with @Provider) in a JAX-RS application.

    youdao

  • 一个Scala单例(singleton),因为使用对象声明而不是声明。

    This is a Scala singleton because it USES the object declaration instead of a class declaration.

    youdao

  • 多个单例对象不同加载同时加载

    Multiple singletons simultaneously loaded by different class loaders.

    youdao

  • 模式确保只有一个提供一个全局访问

    The Singleton Pattern:ensures a class has only on instance, and provides a global point of access to it.

    youdao

  • 使用这个需要复制代码可以实现任意单例

    So with this class we can makeany class singleton, without duplicating the code.

    youdao

  • 使用来实现单例模式可以确保在任何时间只有一个对象

    Classes implementing Singleton pattern will ensure that only one instance of the object ever exists at any one time.

    youdao

  • 什么时候使用带有静态成员,什么时候使用

    When would you use a class with static members and when would you use a Singleton class?

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定