This is a ref-counted object so another non-deriving object should not be able to delete it.
Change-Id: Iacca4e57bc7871c33d0c3602051e2980037de20f
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
TestApplication application;
CustomActorImpl* actor = new Impl::TestCustomActor();
- delete actor;
+ CustomActor customActor( *actor ); // Will automatically unref at the end of this function
DALI_TEST_CHECK( true );
END_TEST;
{
TestApplication application;
CustomActorImpl* impl = new Impl::SimpleTestCustomActor();
+ CustomActor customActor( *impl ); // Will automatically unref at the end of this function
impl->OnPropertySet( 0, 0 );
DALI_TEST_CHECK( true );
- delete impl;
END_TEST;
}
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace Dali
{
-CustomActorImpl::~CustomActorImpl()
-{
-}
-
CustomActor CustomActorImpl::Self() const
{
return CustomActor(mOwner);
{
}
+CustomActorImpl::~CustomActorImpl()
+{
+}
+
void CustomActorImpl::Initialize(Internal::CustomActor& owner)
{
DALI_ASSERT_DEBUG(mOwner == NULL); // should not already be owned
#define __DALI_CUSTOM_ACTOR_IMPL_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
class Extension; ///< Forward declare future extension interface
/**
- * @brief Virtual destructor
- * @SINCE_1_0.0
- */
- virtual ~CustomActorImpl();
-
- /**
* @brief Used by derived CustomActorImpl instances, to access the public Actor interface.
*
* @SINCE_1_0.0
*/
CustomActorImpl( ActorFlags flags );
+ /**
+ * @brief Virtual destructor
+ * @SINCE_1_0.0
+ */
+ virtual ~CustomActorImpl();
+
// Size negotiation helpers
/**