|
Nope.
newInstance invokes the no-arg constructor and it's performance is about the
same as:
MyObject o = new MyObject();
To use
newInstance you need to provide a public no-arg constructor. The only extra
overhead is casting, methinks, but it's negligible. You should consider a pool
of objects if they're being created/destroyed often.
Juan Pablo Lorandi
Chief Software
Architect
Code Foundry Ltd.
Barberstown, Straffan, Co. Kildare, Ireland. Tel: +353-1-6012050 Fax: +353-1-6012051 Mobile: +353-86-2157900 www.codefoundry.com Disclaimer:
Opinions expressed are entirely
personal and bear no relevance to opinions held by my employer.
Code Foundry Ltd.'s opinion is that I
should get back to work.
|
Title: Message
- Class.Newinstance Glenn Dickson
- Juan Pablo Lorandi
